Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ genapi:
../qcodes/instrument_drivers/Keithley \
../qcodes/instrument_drivers/keysight \
../qcodes/instrument_drivers/Keysight \
../qcodes/instrument_drivers/oxford \
../qcodes/instrument_drivers/Lakeshore \
../qcodes/instrument_drivers/QDev/* \
../qcodes/instrument_drivers/QuantumDesign/* \
Expand Down
7 changes: 7 additions & 0 deletions docs/drivers_api/Oxford.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.. _oxford_api :

Oxford Instruments Drivers
==========================

.. automodule:: qcodes.instrument_drivers.oxford
:autosummary:
1 change: 1 addition & 0 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ sphinx-apidoc -o _auto -d 10 ..\qcodes ^
..\qcodes\instrument_drivers\Keithley ^
..\qcodes\instrument_drivers\Keysight ^
..\qcodes\instrument_drivers\Lakeshore ^
..\qcodes\instrument_drivers\oxford ^
..\qcodes\instrument_drivers\QuantumDesign\* ^
..\qcodes\instrument_drivers\QDev\* ^
..\qcodes\instrument_drivers\rigol\* ^
Expand Down
26 changes: 18 additions & 8 deletions qcodes/instrument_drivers/oxford/MercuryiPS_VISA.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,9 @@ def _signal_parser(our_scaling: float, response: str) -> float:
return float(digits)*their_scaling*our_scaling


class MercuryWorkerPS(InstrumentChannel):
class OxfordMercuryWorkerPS(InstrumentChannel):
"""
Class to hold a worker power supply for the MercuryiPS
Class to hold a worker power supply for the Oxford MercuryiPS
"""

def __init__(self, parent: VisaInstrument, name: str, UID: str) -> None:
Expand Down Expand Up @@ -207,7 +207,13 @@ def _param_setter(self, set_cmd: str, value: Union[float, str]) -> None:
# the intended value


class MercuryiPS(VisaInstrument):
MercuryWorkerPS = OxfordMercuryWorkerPS
"""
Alias for backwards compatibility
"""


class OxfordMercuryiPS(VisaInstrument):
"""
Driver class for the QCoDeS Oxford Instruments MercuryiPS magnet power
supply
Expand Down Expand Up @@ -259,7 +265,7 @@ def __init__(self, name: str, address: str, visalib: Optional[str] = None,
# TODO: Query instrument to ensure which PSUs are actually present
for grp in ['GRPX', 'GRPY', 'GRPZ']:
psu_name = grp
psu = MercuryWorkerPS(self, psu_name, grp)
psu = OxfordMercuryWorkerPS(self, psu_name, grp)
self.add_submodule(psu_name, psu)

self._field_limits = (field_limits if field_limits else
Expand Down Expand Up @@ -387,7 +393,7 @@ def _set_target(self, coordinate: str, target: float) -> None:
# actually assign the target on the workers
cartesian_targ = self._target_vector.get_components('x', 'y', 'z')
for targ, worker in zip(cartesian_targ, self.submodules.values()):
if not isinstance(worker, MercuryWorkerPS):
if not isinstance(worker, OxfordMercuryWorkerPS):
raise RuntimeError(f"Expected a MercuryWorkerPS but got "
f"{type(worker)}")
worker.field_target(targ)
Expand Down Expand Up @@ -418,7 +424,7 @@ def _ramp_simultaneously(self) -> None:
out of your safe region. Use with care.
"""
for worker in self.submodules.values():
if not isinstance(worker, MercuryWorkerPS):
if not isinstance(worker, OxfordMercuryWorkerPS):
raise RuntimeError(f"Expected a MercuryWorkerPS but got "
f"{type(worker)}")
worker.ramp_to_target()
Expand All @@ -432,7 +438,7 @@ def _ramp_simultaneously_blocking(self) -> None:
self._ramp_simultaneously()

for worker in self.submodules.values():
if not isinstance(worker, MercuryWorkerPS):
if not isinstance(worker, OxfordMercuryWorkerPS):
raise RuntimeError(f"Expected a MercuryWorkerPS but got "
f"{type(worker)}")
# wait for the ramp to finish, we don't care about the order
Expand Down Expand Up @@ -527,7 +533,7 @@ def ramp(self, mode: str = "safe") -> None:
meas_vals = cast(List[float], meas_vals)

for cur, worker in zip(meas_vals, self.submodules.values()):
if not isinstance(worker, MercuryWorkerPS):
if not isinstance(worker, OxfordMercuryWorkerPS):
raise RuntimeError(f"Expected a MercuryWorkerPS but got "
f"{type(worker)}")
if worker.field_target() != cur:
Expand Down Expand Up @@ -575,3 +581,7 @@ def ask(self, cmd: str) -> str:
base_resp = resp.replace(f'STAT:{base_cmd}', '')

return base_resp


MercuryiPS = OxfordMercuryiPS
"""Alias for backwards compatibility"""
4 changes: 4 additions & 0 deletions qcodes/instrument_drivers/oxford/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
from .MercuryiPS_VISA import OxfordMercuryiPS, OxfordMercuryWorkerPS
from .triton import OxfordTriton

__all__ = ["OxfordMercuryWorkerPS", "OxfordMercuryiPS", "OxfordTriton"]
6 changes: 5 additions & 1 deletion qcodes/instrument_drivers/oxford/triton.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from qcodes.validators import Enum, Ints


class Triton(IPInstrument):
class OxfordTriton(IPInstrument):
r"""
Triton Driver

Expand Down Expand Up @@ -406,3 +406,7 @@ def _parse_pres(self, msg: str) -> Optional[float]:

def _recv(self) -> str:
return super()._recv().rstrip()


Triton = OxfordTriton
"""Alias for backwards compatibility"""