labdrivers.oxford

class labdrivers.oxford.itc503.Itc503(gpib_addr=24)[source]

Module to connect to an ITC 503.

Modes supported: GPIB

Parameters:gpib_addr – GPIB address of the ITC 503
getValue(variable=0)[source]

Read the variable defined by the index.

The possible inputs are:

0: SET TEMPERATURE
1: SENSOR 1 TEMPERATURE
2: SENSOR 2 TEMPERATURE
3: SENSOR 3 TEMPERATURE
4: TEMPERATURE ERROR
5: HEATER O/P (as %)
6: HEATER O/P (as V)
7: GAS FLOW O/P (a.u.)
8: PROPORTIONAL BAND
9: INTEGRAL ACTION TIME
10: DERIVATIVE ACTION TIME
Parameters:(int) (variable) – Index of variable to read.
setAutoControl(auto_manual=0)[source]

Sets automatic control for heater/gas(needle valve).

Value:Status map
0: heater manual, gas manual 1: heater auto , gas manual 2: heater manual, gas auto 3: heater auto , gas auto
Parameters:auto_manual – Index for gas/manual.
setControl(unlocked=1, remote=1)[source]

Set the LOCAL / REMOTE control state of the ITC 503

Parameters:
  • (int) (remote) – 0 to lock, 1 to unlock
  • (int) – 0 for local, 1 for remote
Returns:

None

setDerivative(derivative=0)[source]

Sets the derivative action time.

Parameters:derivative – Derivative action time. Ranges from 0 to 273 minutes.
setGasOutput(gas_output=0)[source]

Sets the gas (needle valve) output level.

Parameters:gas_output – Sets the percent of the maximum gas output in units of 0.1%. Min: 0. Max: 999.
setHeaterOutput(heater_output=0)[source]

Sets the heater output level.

Parameters:heater_output – Sets the percent of the maximum heater output in units of 0.1%. Min: 0. Max: 999.
setHeaterSensor(sensor=1)[source]

Selects the heater sensor.

Parameters:sensor – Should be 1, 2, or 3, corresponding to the heater on the front panel.
setIntegral(integral=0)[source]

Sets the integral action time.

Parameters:integral – Integral action time, in steps of 0.1 minute. Ranges from 0 to 140 minutes.
setProportional(prop=0)[source]

Sets the proportional band.

Parameters:(float) (prop) – Proportional band, in steps of 0.0001K.
setSweeps(sweep_parameters)[source]

Sets the parameters for all sweeps.

This fills up a dictionary with all the possible steps in a sweep. If a step number is not found in the sweep_parameters dictionary, then it will create the sweep step with all parameters set to 0.

Parameters:sweep_parameters – A dictionary whose keys are the step numbers (keys: 1-16). The value of each key is a dictionary whose keys are the parameters in the sweep table (see _setSweepStep).
setTemperature(temperature=0.01)[source]

Change the temperature set point.

Parameters:(float) (temperature) – Temperature set point in Kelvin (default: 0.010)
class labdrivers.oxford.ips120.Ips120(GPIBaddr)[source]
readField()[source]

Read the current magnetic field in Tesla

Returns:current magnetic field in Tesla
Return type:field(float)
readFieldSetpoint()[source]

Read the current set point for the magnetic field in Tesla

Returns:current set point for the magnetic field in Tesla
Return type:setpoint(float)
readFieldSweepRate()[source]

Read the current magnetic field sweep rate in Tesla/min

Returns:current magnetic field sweep rate in Tesla/min
Return type:sweep_rate(float)
setActivity(state=1)[source]

Set the field activation method

0 - Hold 1 - To Set Point 2 - To Zero 3 - Clamp (clamp the power supply output)

Parameters:state (int) – the field activation method
setControl(state=3)[source]

Set the LOCAL / REMOTE control state of the IPS 120-10

0 - Local & Locked (default state) 1 - Remote & Locked 2 - Local & Unlocked 3 - Remote & Locked

Parameters:state (int) – the state in which to place the IPS 120-10
setDisplay(display)[source]

Set the display to show amps or tesla

Parameters:display (str) – One of [‘amps’,’tesla’]
setFieldSetpoint(field)[source]

Set the magnetic field set point, in Tesla

Parameters:field (float) – the magnetic field set point, in Tesla
setFieldSweepRate(rate)[source]

Set the magnetic field sweep rate, in Tesla/min

Parameters:rate (float) – the magnetic field sweep rate, in Tesla/min
setHeater(state=1)[source]

Set the switch heater activation state

0 - Heater Off (close switch) 1 - Heater On if PSU=Magnet (open switch) 2 - Heater On, no checks (open switch)

Parameters:state (int) – the switch heater activation state
waitForField(timeout=600, error_margin=0.01)[source]

Wait for the field to reach the set point

Parameters:
  • timeout (int) – maximum time to wait, in seconds
  • error_margin (float) – how close the field needs to be to the set point, in tesla
Returns:

whether the field set point was reached

Return type:

(bool)

class labdrivers.oxford.mercuryips.MercuryIps(mode='ip', resource_name=None, ip_address=None, port=7020, timeout=10.0, bytes_to_read=2048)[source]
class Magnet(axis, mode='ip', resource_name=None, ip_address=None, port=7020, timeout=10.0, bytes_to_read=2048)[source]

Constructor for a magnet along a certain axis.

Parameters:
  • axis (string) – The axis for the magnet, given by [‘GRPX’|’GRPY’|’GRPZ’]
  • mode (string) – Connection, given by [‘ip’|’visa’]
  • resource_name (string) – VISA resource name of the MercuryIPS
  • ip_address (string) – IP address of the MercuryIPS
  • port (integer) – Port number of the Mercury iPS
  • timeout (float) – Time to wait for a response from the MercuryIPS before throwing an error.
  • bytes_to_read (integer) – Amount of information to read from a response
QUERY_AND_RECEIVE = {'ip': <function MercuryIps.Magnet.query_ip at 0x7fdcf1079b70>, 'visa': <function MercuryIps.Magnet.query_visa at 0x7fdcf1079bf8>}
clamp()[source]

Puts a magnet in a CLAMP state.

clamped()[source]

Queries if magnet is in a CLAMP state.

current_ramp_rate

The ramp rate of the current for a magnet in Amperes per minute.

current_setpoint

The set point of the current for a magnet in Amperes.

static extract_value(response, noun, unit)[source]

Finds the value that is contained within the response to a previously sent query.

Parameters:
  • response (string) – The response from a query.
  • noun – The part of the query that refers to the NOUN (refer to MercuryIPS documentation).
  • unit – The measurement unit (e.g. K for Kelvin, T for Tesla).
Returns float:

The value of the response, but without units.

field_ramp_rate

The magnetic field ramp rate in Tesla per minute along the magnet axis.

field_setpoint

The magnetic field set point in Tesla

hold()[source]

Puts a magnet in a HOLD state.

This action does one of the following: 1) Stops a ramp 2) Allows the field and current to ramp

holding()[source]

Queries if magnet is in a HOLD state.

magnetic_field

Gets the magnetic field.

query_ip(command)[source]

Sends a query to the MercuryIPS via ethernet.

Parameters:command (string) – The command, which should be in the NOUN + VERB format
Returns str:The MercuryIPS response
query_visa(command)[source]

Sends a query to the MercuryIPS via VISA.

Parameters:command (string) – The command, which should be in the NOUN + VERB format
Returns str:The MercuryIPS response
ramp_to_setpoint()[source]

Ramps a magnet to the setpoint.

ramp_to_zero()[source]

Ramps a magnet from its current magnetic field to zero field.

ramping()[source]

Queries if magnet is ramping.

circle_sweep(field_radius, number_points)[source]
class labdrivers.oxford.triton200.Triton200(ip_address, port_number=33576, timeout=10000, bytes_to_read=2048)[source]

Create an instance of the Triton200 class.

Supported modes: IP

Parameters:
  • ip_address (str) – The IP address of the Triton 200.
  • port_number (int) – The associated port number of the Triton 200 (default: 33576)
  • timeout (int) – How long to wait for a response (default: 10000)
  • bytes_to_read (int) – How many bytes to accept from the response (default: 2048)
controlled_ramp_off()[source]

Stops a temperature sweep for the current temperature channel.

controlled_ramp_on()[source]

Starts a temperature sweep for the current temperature channel.

static extract_value(response, noun, unit)[source]
query_and_receive(command)[source]

Queries the Oxford Triton 200 with the given command.

Parameters:command – Specifies a read/write of a property.
temperature

The temperature reading from the current temperature channel.

temperature_channel

returns str – The temperature channel, either the cernox (5) or the RuO2 (6)

temperature_setpoint
turbo_off()[source]

Turns off a turbo pump.

WARNING: Do not use this unless you know what you are doing.

turbo_on()[source]

Turns on a turbo pump.

WARNING: Do not use this unless you know what you are doing.

update_heater()[source]

Associates the heater with the current temperature channel and changes the heater current to preset values given the temperature set point.