Oxford Instruments Drivers¶
Classes:
|
Class to hold a worker power supply for the Oxford MercuryiPS |
|
Driver class for the QCoDeS Oxford Instruments MercuryiPS magnet power supply |
|
Triton Driver |
- class qcodes.instrument_drivers.oxford.OxfordMercuryWorkerPS(parent: VisaInstrument, name: str, UID: str, **kwargs: Unpack[InstrumentBaseKWArgs])[source]¶
Bases:
InstrumentChannel
Class to hold a worker power supply for the Oxford MercuryiPS
- Parameters:
parent – The Instrument instance of the MercuryiPS
name – The ‘colloquial’ name of the PS
UID – The UID as used internally by the MercuryiPS, e.g. ‘GRPX’
**kwargs – Forwarded to base class.
Attributes:
Parameter voltage
Parameter current
Parameter current_persistent
Parameter current_target
Parameter field_target
Parameter current_ramp_rate
Parameter field_ramp_rate
Parameter field
Parameter field_persistent
Parameter ATOB
Parameter ramp_status
Methods:
Unconditionally ramp this PS to its target
- voltage: Parameter = self.add_parameter( "voltage", label="Output voltage", get_cmd=partial(self._param_getter, "SIG:VOLT"), unit="V", get_parser=partial(_signal_parser, 1), )¶
Parameter voltage
- current: Parameter = self.add_parameter( "current", label="Output current", get_cmd=partial(self._param_getter, "SIG:CURR"), unit="A", get_parser=partial(_signal_parser, 1), )¶
Parameter current
- current_persistent: Parameter = self.add_parameter( "current_persistent", label="Output persistent current", get_cmd=partial(self._param_getter, "SIG:PCUR"), unit="A", get_parser=partial(_signal_parser, 1), )¶
Parameter current_persistent
- current_target: Parameter = self.add_parameter( "current_target", label="Target current", get_cmd=partial(self._param_getter, "SIG:CSET"), unit="A", get_parser=partial(_signal_parser, 1), )¶
Parameter current_target
- field_target: Parameter = self.add_parameter( "field_target", label="Target field", get_cmd=partial(self._param_getter, "SIG:FSET"), set_cmd=partial(self._param_setter, "SIG:FSET"), unit="T", get_parser=partial(_signal_parser, 1), )¶
Parameter field_target
- current_ramp_rate: Parameter = self.add_parameter( "current_ramp_rate", label="Ramp rate (current)", unit="A/s", get_cmd=partial(self._param_getter, "SIG:RCST"), get_parser=partial(_signal_parser, 1 / 60), )¶
Parameter current_ramp_rate
- field_ramp_rate: Parameter = self.add_parameter( "field_ramp_rate", label="Ramp rate (field)", unit="T/s", set_cmd=partial(self._param_setter, "SIG:RFST"), get_cmd=partial(self._param_getter, "SIG:RFST"), get_parser=partial(_signal_parser, 1 / 60), set_parser=lambda x: x * 60, )¶
Parameter field_ramp_rate
- field: Parameter = self.add_parameter( "field", label="Field strength", unit="T", get_cmd=partial(self._param_getter, "SIG:FLD"), get_parser=partial(_signal_parser, 1), )¶
Parameter field
- field_persistent: Parameter = self.add_parameter( "field_persistent", label="Persistent field strength", unit="T", get_cmd=partial(self._param_getter, "SIG:PFLD"), get_parser=partial(_signal_parser, 1), )¶
Parameter field_persistent
- ATOB: Parameter = self.add_parameter( "ATOB", label="Current to field ratio", unit="A/T", get_cmd=partial(self._param_getter, "ATOB"), get_parser=partial(_signal_parser, 1), set_cmd=partial(self._param_setter, "ATOB"), )¶
Parameter ATOB
- ramp_status: Parameter = self.add_parameter( "ramp_status", label="Ramp status", get_cmd=partial(self._param_getter, "ACTN"), set_cmd=self._ramp_status_setter, get_parser=_response_preparser, val_mapping={ "HOLD": "HOLD", "TO SET": "RTOS", "CLAMP": "CLMP", "TO ZERO": "RTOZ", }, )¶
Parameter ramp_status
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- class qcodes.instrument_drivers.oxford.OxfordMercuryiPS(name: str, address: str, *, field_limits: Callable[[float, float, float], bool] | None = None, **kwargs: Unpack[VisaInstrumentKWArgs])[source]¶
Bases:
VisaInstrument
Driver class for the QCoDeS Oxford Instruments MercuryiPS magnet power supply
- Parameters:
name – The name to give this instrument internally in QCoDeS
address – The VISA resource of the instrument. Note that a socket connection to port 7020 must be made
field_limits – A function describing the allowed field range (T). The function shall take (x, y, z) as an input and return a boolean describing whether that field value is acceptable.
**kwargs – kwargs are forwarded to base class.
Attributes:
The default terminator to use if the terminator is not specified when creating the instrument.
Parameter field_target
Parameter field_measured
Parameter field_ramp_rate
Methods:
get_idn
()Parse the raw non-SCPI compliant IDN string into an IDN dict
Update all the field components.
Returns True if any axis has a ramp status that is either 'TO SET' or 'TO ZERO'
set_new_field_limits
(limit_func)Assign a new field limit function to the driver
ramp
([mode])Ramp the fields to their present target value
ask
(cmd)Since Oxford Instruments implement their own version of a SCPI-like language, we implement our own reader.
- default_terminator: str | None = '\n'¶
The default terminator to use if the terminator is not specified when creating the instrument. None means use the default terminator from PyVisa.
- field_target: Parameter = self.add_parameter( name="field_target", label="target field", unit="T", get_cmd=self._get_target_field, set_cmd=self._set_target_field, )¶
Parameter field_target
- field_measured: Parameter = self.add_parameter( name="field_measured", label="measured field", unit="T", get_cmd=self._get_field, )¶
Parameter field_measured
- field_ramp_rate: Parameter = self.add_parameter( name="field_ramp_rate", label="ramp rate", unit="T/s", get_cmd=self._get_ramp_rate, set_cmd=self._set_ramp_rate, )¶
Parameter field_ramp_rate
- visa_handle: pyvisa.resources.MessageBasedResource = visa_handle¶
The VISA resource used by this instrument.
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶
- get_idn() dict[str, str | None] [source]¶
Parse the raw non-SCPI compliant IDN string into an IDN dict
- Returns:
The normal IDN dict
- is_ramping() bool [source]¶
Returns True if any axis has a ramp status that is either ‘TO SET’ or ‘TO ZERO’
- set_new_field_limits(limit_func: Callable[[float, float, float], bool]) None [source]¶
Assign a new field limit function to the driver
- Parameters:
limit_func – must be a function mapping (Bx, By, Bz) -> True/False where True means that the field is INSIDE the allowed region
- ramp(mode: str = 'safe') None [source]¶
Ramp the fields to their present target value
- Parameters:
mode – how to ramp, either ‘simul’, ‘simul-block’ or ‘safe’. In ‘simul’ and ‘simul-block’ mode, the fields are ramping simultaneously in a non-blocking mode and blocking mode, respectively. There is no safety check that the safe zone is not exceeded. In ‘safe’ mode, the fields are ramped one-by-one in a blocking way that ensures that the total field stays within the safe region (provided that this region is convex).
- class qcodes.instrument_drivers.oxford.OxfordTriton(name: str, address: str | None = None, port: int | None = None, terminator: str = '\r\n', tmpfile: str | None = None, timeout: float = 20, **kwargs: Unpack[InstrumentBaseKWArgs])[source]¶
Bases:
IPInstrument
Triton Driver
- Parameters:
name – name of the cryostat.
address – IP-address of the fridge computer. Defaults to None.
port – port of the oxford program running on the fridge computer. The relevant port can be found in the manual for the fridge or looked up on the fridge computer. Defaults to None.
terminator – Defaults to ‘rn’
tmpfile – an exported windows registry file from the registry path: [HKEY_CURRENT_USERSoftwareOxford InstrumentsTriton System ControlThermometry] and is used to extract the available temperature channels.
timeout – Defaults to 20.
**kwargs – Forwarded to base class.
Status: beta-version.
Todo
fetch registry directly from fridge-computer
Attributes:
Parameter time
Parameter action
Parameter status
Parameter pid_control_channel
Parameter pid_mode
Parameter pid_ramp
Parameter pid_setpoint
Parameter pid_p
Parameter pid_i
Parameter pid_d
Parameter pid_rate
Parameter pid_range
Parameter magnet_status
Parameter magnet_sweeprate
Parameter magnet_sweeprate_insta
Parameter B
Parameter Bx
Parameter By
Parameter Bz
Parameter magnet_sweep_time
Parameter turb1_speed
Methods:
- time: Parameter = self.add_parameter( name="time", label="System Time", get_cmd="READ:SYS:TIME", get_parser=self._parse_time, )¶
Parameter time
- action: Parameter = self.add_parameter( name="action", label="Current action", get_cmd="READ:SYS:DR:ACTN", get_parser=self._parse_action, )¶
Parameter action
- status: Parameter = self.add_parameter( name="status", label="Status", get_cmd="READ:SYS:DR:STATUS", get_parser=self._parse_status, )¶
Parameter status
- pid_control_channel: Parameter = self.add_parameter( name="pid_control_channel", label="PID control channel", get_cmd=self._get_control_channel, set_cmd=self._set_control_channel, vals=Ints(1, 16), )¶
Parameter pid_control_channel
- pid_mode: Parameter = self.add_parameter( name="pid_mode", label="PID Mode", get_cmd=partial(self._get_control_param, "MODE"), set_cmd=partial(self._set_control_param, "MODE"), val_mapping={"on": "ON", "off": "OFF"}, )¶
Parameter pid_mode
- pid_ramp: Parameter = self.add_parameter( name="pid_ramp", label="PID ramp enabled", get_cmd=partial(self._get_control_param, "RAMP:ENAB"), set_cmd=partial(self._set_control_param, "RAMP:ENAB"), val_mapping={"on": "ON", "off": "OFF"}, )¶
Parameter pid_ramp
- pid_setpoint: Parameter = self.add_parameter( name="pid_setpoint", label="PID temperature setpoint", unit="K", get_cmd=partial(self._get_control_param, "TSET"), set_cmd=partial(self._set_control_param, "TSET"), )¶
Parameter pid_setpoint
- pid_p: Parameter = self.add_parameter( name="pid_p", label="PID proportionality", get_cmd=partial(self._get_control_param, "P"), set_cmd=partial(self._set_control_param, "P"), vals=Numbers(0, 1e3), )¶
Parameter pid_p
- pid_i: Parameter = self.add_parameter( name="pid_i", label="PID intergral", get_cmd=partial(self._get_control_param, "I"), set_cmd=partial(self._set_control_param, "I"), vals=Numbers(0, 1e3), )¶
Parameter pid_i
- pid_d: Parameter = self.add_parameter( name="pid_d", label="PID derivative", get_cmd=partial(self._get_control_param, "D"), set_cmd=partial(self._set_control_param, "D"), vals=Numbers(0, 1e3), )¶
Parameter pid_d
- pid_rate: Parameter = self.add_parameter( name="pid_rate", label="PID ramp rate", unit="K/min", get_cmd=partial(self._get_control_param, "RAMP:RATE"), set_cmd=partial(self._set_control_param, "RAMP:RATE"), )¶
Parameter pid_rate
- pid_range: Parameter = self.add_parameter( name="pid_range", label="PID heater range", # TODO: The units in the software are mA, how to # do this correctly? unit="mA", get_cmd=partial(self._get_control_param, "RANGE"), set_cmd=partial(self._set_control_param, "RANGE"), vals=Enum(*self._heater_range_curr), )¶
Parameter pid_range
- magnet_status: Parameter = self.add_parameter( name="magnet_status", label="Magnet status", unit="", get_cmd=partial(self._get_control_B_param, "ACTN"), )¶
Parameter magnet_status
- magnet_sweeprate: Parameter = self.add_parameter( name="magnet_sweeprate", label="Magnet sweep rate", unit="T/min", get_cmd=partial(self._get_control_B_param, "RVST:RATE"), set_cmd=partial(self._set_control_magnet_sweeprate_param), )¶
Parameter magnet_sweeprate
- magnet_sweeprate_insta: Parameter = self.add_parameter( name="magnet_sweeprate_insta", label="Instantaneous magnet sweep rate", unit="T/min", get_cmd=partial(self._get_control_B_param, "RFST"), )¶
Parameter magnet_sweeprate_insta
- B: Parameter = self.add_parameter( name="B", label="Magnetic field", unit="T", get_cmd=partial(self._get_control_B_param, "VECT"), )¶
Parameter B
- Bx: Parameter = self.add_parameter( name="Bx", label="Magnetic field x-component", unit="T", get_cmd=partial(self._get_control_Bcomp_param, "VECTBx"), set_cmd=partial(self._set_control_Bx_param), )¶
Parameter Bx
- By: Parameter = self.add_parameter( name="By", label="Magnetic field y-component", unit="T", get_cmd=partial(self._get_control_Bcomp_param, "VECTBy"), set_cmd=partial(self._set_control_By_param), )¶
Parameter By
- Bz: Parameter = self.add_parameter( name="Bz", label="Magnetic field z-component", unit="T", get_cmd=partial(self._get_control_Bcomp_param, "VECTBz"), set_cmd=partial(self._set_control_Bz_param), )¶
Parameter Bz
- magnet_sweep_time: Parameter = self.add_parameter( name="magnet_sweep_time", label="Magnet sweep time", unit="T/min", get_cmd=partial(self._get_control_B_param, "RVST:TIME"), )¶
Parameter magnet_sweep_time
- turb1_speed: Parameter = self.add_parameter( name="turb1_speed", label=self.pump_label_dict["TURB1"] + " speed", unit="Hz", get_cmd="READ:DEV:TURB1:PUMP:SIG:SPD", get_parser=self._get_parser_pump_speed, )¶
Parameter turb1_speed
- parameters: dict[str, ParameterBase] = {}¶
All the parameters supported by this instrument. Usually populated via
add_parameter()
.
- functions: dict[str, Function] = {}¶
All the functions supported by this instrument. Usually populated via
add_function()
.
- submodules: dict[str, InstrumentModule | ChannelTuple] = {}¶
All the submodules of this instrument such as channel lists or logical groupings of parameters. Usually populated via
add_submodule()
.
- instrument_modules: dict[str, InstrumentModule] = {}¶
All the
InstrumentModule
of this instrument Usually populated viaadd_submodule()
.
- log: InstrumentLoggerAdapter = get_instrument_logger(self, __name__)¶