The oxford_common module

Tools which are shared among multiple Oxford Instruments devices

This provides a class which can be overridden by the various instruments from Oxford instruments. The OxfordCommon class provides the initialization and communication routines common to the ITC503, the PS120, and the IPS120.

Classes

OxfordCommon

class src.instruments.noauto.oxford_common.OxfordCommon(name='Magnet', protocol='ISOBUS', isobusAddress='0', visaAddress='GPIB0::23', serialConfig=None)[source]

This is a class to perform actions common to most Oxford Instruments devices, including the ITC503, the PS120, and the IPS120.

Parameters :

name : str

A name to identify the instrument

protocol : {‘ISOBUS’, ‘GPIB’, ‘Serial’, ‘Gateway Master’, ‘Gateway Slave’}

The protocol for communication between the computer and the power supply.

isobusAddress : str

An integer string representing the ISOBUS address, if relevant. An integer will be accepted and converted.

visaAddress : str

A full VISA resource address (including the bus) to locate the instrument (e.g. “GPIB0::27”).

serialConfig : dict

A dictionary to indicate how to configure a serial port, which is used with both the ‘ISOBUS’ and ‘Serial’ protocols.

Methods

closeCommunication()[source]

Finalize the instrument.

openCommunication()[source]

Initialize the instrument.

Open a new (protocol-specific) communication channel between the computer and the instrument, initializing initializing the ports and sending device clears as appropriate.

Parameters :

protocol : str

A string to indicate the communication protocol for the instrument. It may be one of the following: ‘GPIB’, ‘Gateway Master’, ‘Gateway Slave’, or ‘ISOBUS’. The default is ‘ISOBUS’.

Functions

src.instruments.noauto.oxford_common.waitForStableTemperature(targetTemperature, measurementFunction, allowedDeviation, deviationType='percent', stabilizedTime=60.0, timeout=600.0)[source]

Wait for the temperature to stabilize.

Wait for the temperature to become steady (within some specified tolerance) at a particular target temperature. There are two timers in use in this method. One is the total time elapsed since the function starts, and the other is the time over which the temperature has been within the tolerance (i.e., it resets whenever the temperature goes out of range). The function ends when either the latter timer reaches stabilizedTime or when the former reaches timeout, whichever comes first.

Parameters :

targetTemperature : float

The temperature at which to stabilize.

measurementFunction : function

The function or method to use to measure the temperature.

allowedDeviation : float

By how much the temperature can vary and still be considered to be at the target temperature.

deviationType : str {‘percent’, ‘absolute’}

Whether allowedDeviation should be treated as a percentage of the target temperature or an absolute temperature in Kelvin. For example, assume that the target temperature is 10.0 K, and allowedDeviation is 5. If deviationType is ‘percent’, then the temperature will be accepted as at the target if it is between 9.5 K and 10.5 K, inclusive. If deviationType is ‘absolute’, the accepted range is 5.0 K to 15.0 K, inclusive.

stabilizedTime : float

The minimum time, in seconds, over which the temperature must remain within the accepted range.

timeout : float

Loosely speaking, the maximum time to wait (see timeoutReset).

Returns :

bool :

True if the temperature has been within the allowed range long enough to be considered stable, or False if the function times out.

src.instruments.noauto.oxford_common.expandRange(initial, final, stepArray)[source]

Expand a range, getting the step sizes from an array.

Parameters :

initial : float

The value at which the returned array should start.

final : float

The final value in the returned array.

stepArray : list of 3-tuple of float

A list of tuples specifying step sizes. Each tuple should consist of three elements. The last is the step size, the first is the lowest value for which the step size should be used, and the second is the highest value for which the step size should be used.

Returns :

list of float :

A list of floats spanning from initial to final (inclusive), where the step sizes vary based on the value.

src.instruments.noauto.oxford_common.readAddressConfig(configurationFile, section)[source]

Read the configuration for an Oxford instrument.

Parameters :

configurationFile : str

The absolute path to the configuration file containing the information about the instrument.

section : str

The section within the configuration file containing the information about the relevant instrument.

Returns :

protocol : str

The communication protocol, which may be ‘ISOBUS’, ‘GPIB’, ‘Serial’, ‘Gateway Master’, and ‘Gateway Slave’.

visaAddress : str

The VISA resource address for the power supply.

isobusAddress : str

The ISOBUS address of the instrument

serialConfig : dict

Either None, if no serial port is needed, or a dictionary containing these keys: ‘baud_rate’, ‘parity’, ‘data_bits’, and ‘stop bits’.

Table Of Contents

Previous topic

The ips120 module

Next topic

The itc503 module

This Page