Lakeshore 372
The Lakeshore 372 Agent interfaces with the Lakeshore 372 (LS372) hardware to perform 100 mK and 1K thermometer readout and control heater output. Basic functionality to interface and control an LS372 is provided by the Supporting APIs.
usage: python3 agent.py [-h] [--ip-address IP_ADDRESS]
[--serial-number SERIAL_NUMBER]
[--fake-data FAKE_DATA]
[--dwell-time-delay DWELL_TIME_DELAY]
[--mode {idle,init,acq}]
[--sample-heater SAMPLE_HEATER]
[--enable-control-chan] [--configfile CONFIGFILE]
Agent Options
- --ip-address
- --serial-number
- --fake-data
Set non-zero to fake data, without hardware.
Default: 0
- --dwell-time-delay
Amount of time, in seconds, to delay data collection after switching channels. Note this time should not include the change pause time, which is automatically accounted for. Will automatically be reduced to dwell_time - 1 second if it is set longer than a channel’s dwell time. This ensures at least one second of data collection at the end of a scan.
Default: 0
- --mode
Possible choices: idle, init, acq
Starting action for the Agent.
Default: “acq”
- --sample-heater
Record sample heater output during acquisition.
Default: False
- --enable-control-chan
Enable reading of the control input each acq cycle
Default: False
- --configfile
Yaml file for initializing 372 settings
Configuration File Examples
Below are configuration examples for the ocs config file and for running the Agent in a docker container.
OCS Site Config
To configure your Lakeshore 372 for use with OCS you need to add a Lakeshore372Agent block to your ocs configuration file. Here is an example configuration block:
{'agent-class': 'Lakeshore372Agent',
'instance-id': 'LSA22YG',
'arguments': [['--serial-number', 'LSA22YG'],
['--ip-address', '10.10.10.2'],
['--dwell-time-delay', 0],
['--mode', 'acq'],
['--sample-heater', False],
['--enable-control-chan'],
['--configfile', 'ls372_config.yaml']]},
Each device requires configuration under ‘agent-instances’. See the OCS site configs documentation for more details.
Lakeshore 372 Config
A Lakeshore 372 configuration file allows the user to define device and channel settings (autoscan, enable/disable, calibration curve, etc.) for each Lakeshore 372 in use within one .yaml file. Here is an example for how to build a Lakeshore 372 configuration file:
LSA22YG:
device_settings:
autoscan: 'off'
channel:
1:
enable: 'on'
excitation_mode: 'voltage'
excitation_value: 2.0e-6
autorange: 'on'
resistance_range: 2e3
dwell: 15 # seconds
pause: 10 # seconds
calibration_curve_num: 23
temperature_coeff: 'negative'
2:
enable: 'off'
excitation_mode: 'voltage'
excitation_value: 2.0e-6
autorange: 'off'
resistance_range: 2.0e+3
dwell: 10 # seconds
pause: 3 # seconds
calibration_curve_num: 28
temperature_coeff: 'negative'
LSA2761:
device_settings:
autoscan: 'on'
channel:
1:
enable: 'on'
excitation_mode: 'voltage'
excitation_value: 2.0e-6
autorange: 'on'
resistance_range: 2.0e+3
dwell: 15 # seconds
pause: 10 # seconds
calibration_curve_num: 33
temperature_coeff: 'negative'
2:
enable: 'off'
excitation_mode: 'voltage'
excitation_value: 2.0e-6
autorange: 'off'
resistance_range: 2.0e+3
dwell: 10 # seconds
pause: 3 # seconds
calibration_curve_num: 36
temperature_coeff: 'negative'
3:
enable: 'on'
excitation_mode: 'voltage'
excitation_value: 2.0e-6
autorange: 'on'
resistance_range: 2.0e+3
dwell: 15 # seconds
pause: 10 # seconds
calibration_curve_num: 34
temperature_coeff: 'negative'
4:
enable: 'on'
excitation_mode: 'voltage'
excitation_value: 2.0e-6
autorange: 'off'
resistance_range: 2.0e+3
dwell: 10 # seconds
pause: 3 # seconds
calibration_curve_num: 35
temperature_coeff: 'negative'
Note
For setting a 372 channel to a specific resistance range, be sure to check that autorange is set to ‘off’. Else, the autorange setting will persist over your desired resistance range.
Note
Make sure values like excitation and resistance are in float form as shown in the example. Ex: always 2.0e+3, never 2e3
Docker Compose
The Lakeshore 372 Agent should be configured to run in a Docker container. An example configuration is:
ocs-LSA22YG:
image: simonsobs/socs:latest
hostname: ocs-docker
network_mode: "host"
environment:
- INSTANCE_ID=LSA22YG
- SITE_HUB=ws://127.0.0.1:8001/ws
- SITE_HTTP=http://127.0.0.1:8001/call
volumes:
- ${OCS_CONFIG_DIR}:/config:ro
Note
Since the 372 Agent container needs network_mode: "host"
, it must be
configured to connect to the crossbar server as if it was on the host
system. In this example the crossbar server is running on localhost,
127.0.0.1
, but on your network this may be different.
Note
The serial numbers here will need to be updated for your device.
Description
The Lakeshore 372 provides several connection options for communicating remotely with the hardware. For the Lakeshore 372 Agent we have written the interface for communication via Ethernet cable. When extending the Agent it can often be useful to directly communicate with the 372 for testing. This is described in the following section.
Direct Communication
Direct communication with the Lakeshore can be achieved without OCS, using the
Lakeshore372.py
module in socs/socs/Lakeshore/
. From that directory,
you can run a script like:
from Lakeshore372 import LS372
ls = LS372('10.10.10.2')
You can use the API detailed on this page to then interact with the Lakeshore.
Each Channel is given a Channel object in ls.channels
. You can query the
resistance measured on the currently active channel with:
ls.get_active_channel().get_resistance_reading()
That should get you started with direct communication. The API is fairly full featured. For any feature requests for functionality that might be missing, please file a Github issue.
Agent API
- class socs.agents.lakeshore372.agent.LS372_Agent(agent, name, ip, fake_data=False, dwell_time_delay=0, enable_control_chan=False, configfile=None)[source]
Agent to connect to a single Lakeshore 372 device.
- Parameters:
name (ApplicationSession) – ApplicationSession for the Agent.
ip (str) – IP Address for the 372 device.
fake_data (bool, optional) – generates random numbers without connecting to LS if True.
dwell_time_delay (int, optional) – Amount of time, in seconds, to delay data collection after switching channels. Note this time should not include the change pause time, which is automatically accounted for. Will automatically be reduced to dwell_time - 1 second if it is set longer than a channel’s dwell time. This ensures at least one second of data collection at the end of a scan.
enable_control_chan (bool, optional) – If True, will read data from the control channel each iteration of the acq loop. Defaults to False.
configfile (str, optional) – Path to a LS372 config file. This will be loaded by default by input_configfile by default
- init_lakeshore(auto_acquire=False, acq_params=None, force=False, configfile=None)[source]
Task - Perform first time setup of the Lakeshore 372 communication.
- Parameters:
auto_acquire (bool, optional) – Default is False. Starts data acquisition after initialization if True.
acq_params (dict, optional) – Params to pass to acq process if auto_acquire is True.
force (bool, optional) – Force initialization, even if already initialized. Defaults to False.
configfile (str, optional) – .yaml file for initializing 372 channel settings
- acq(sample_heater=False, run_once=False)[source]
Process - Acquire data from the Lakeshore 372.
- Parameters:
sample_heater (bool, optional) – Default is False. Will record values from the sample heater, typically used to servo a DR if True.
Notes
The most recent data collected is stored in session data in the structure:
>>> response.session['data'] {"fields": {"Channel_05": {"T": 293.644, "R": 33.752, "timestamp": 1601924482.722671}, "Channel_06": {"T": 0, "R": 1022.44, "timestamp": 1601924499.5258765}, "Channel_08": {"T": 0, "R": 1026.98, "timestamp": 1601924494.8172355}, "Channel_01": {"T": 293.41, "R": 108.093, "timestamp": 1601924450.9315426}, "Channel_02": {"T": 293.701, "R": 30.7398, "timestamp": 1601924466.6130798}, "control": {"T": 293.701, "R": 30.7398, "timestamp": 1601924466.6130798} } }
- set_heater_range(heater, range, wait=0)[source]
Task - Adjust the heater range for servoing cryostat. Wait for a specified amount of time after the change.
- Parameters:
heater (str) – Name of heater to set range for, either ‘sample’ or ‘still’.
range (str, float) – see arguments in
socs.Lakeshore.Lakeshore372.Heater.set_heater_range()
wait (float, optional) – Amount of time to wait after setting the heater range. This allows the servo time to adjust to the new range.
- set_excitation_mode(channel, mode)[source]
Task - Set the excitation mode of a specified channel.
- Parameters:
channel (int) – Channel to set the excitation mode for. Valid values are 1-16.
mode (str) – Excitation mode. Possible modes are ‘current’ or ‘voltage’.
- set_excitation(channel, value)[source]
Task - Set the excitation voltage/current value of a specified channel.
- Parameters:
channel (int) – Channel to set the excitation for. Valid values are 1-16.
value (float) – Excitation value in volts or amps depending on set excitation mode. See
socs.Lakeshore.Lakeshore372.Channel.set_excitation()
- get_excitation(channel)[source]
Task - Get the excitation voltage/current value of a specified channel.
- Parameters:
channel (int) – Channel to get the excitation for. Valid values are 1-16.
- set_resistance_range(channel, resistance_range)[source]
Task - Set the resistance range for a specified channel.
- Parameters:
channel (int) – Channel to set the resistance range for. Valid values are 1-16.
resistance_range (float) – range in ohms we want to measure. Doesn’t need to be exactly one of the options on the lakeshore, will select closest valid range, though note these are in increments of 2, 6.32, 20, 63.2, etc.
Notes
If autorange is on when you change the resistance range, it may try to change it to another value.
- get_resistance_range(channel)[source]
Task - Get the resistance range for a specified channel.
- Parameters:
channel (int) – Channel to get the resistance range for. Valid values are 1-16.
- set_dwell(channel, dwell)[source]
Task - Set the autoscanning dwell time for a particular channel.
- Parameters:
channel (int) – Channel to set the dwell time for. Valid values are 1-16.
dwell (int) – Dwell time in seconds, type is int and must be in the range 1-200 inclusive.
- get_dwell(channel)[source]
Task - Get the autoscanning dwell time for a particular channel.
- Parameters:
channel (int) – Channel to get the dwell time for. Valid values are 1-16.
- set_pid(P, I, D)[source]
Task - Set the PID parameters for servo control of fridge.
- Parameters:
P (int) – Proportional term for PID loop
I (int) – Integral term for the PID loop
D (int) – Derivative term for the PID loop
Notes
Makes a call to
socs.Lakeshore.Lakeshore372.Heater.set_pid()
.
- set_active_channel(channel)[source]
Task - Set the active channel on the LS372.
- Parameters:
channel (int) – Channel to switch readout to. Valid values are 1-16.
- set_autoscan(autoscan)[source]
Task - Sets autoscan on the LS372.
- Parameters:
autoscan (bool) – True to enable autoscan, False to disable.
- servo_to_temperature(temperature)[source]
Task - Servo to a given temperature using a closed loop PID on a fixed channel. This will automatically disable autoscan if enabled.
- Parameters:
temperature (float) – Temperature to servo to in units of Kelvin.
- engage_channel(channel, state)[source]
Task - Enables/disables a channel on the LS372
- Parameters:
channel (int) – Channel number to enable
state (str) – Desired power state of channel; ‘on’ or ‘off’
- engage_autorange(channel, state)[source]
Task - Enables/disables autorange for a channel on the LS372
- Parameters:
channel (int) – Channel number for enabling autorange
state (str) – Desired autorange state of channel: ‘on’ or ‘off’
- set_calibration_curve(channel, curve_number)[source]
Task - Sets the calibration curve number for a particular channel.
- Parameters:
channel (int) – Channel number to set calibration curve to. Channel ranges are 1 to 16, and 0 for control channel A.
curve_number (int) – Curve number of calibration curve uploaded to the LS372. Curve number ranges are 21 to 59.
- get_input_setup(channel)[source]
Task - Gets measurement inputs for a specific channel on the LS372
- Parameters:
channel (int) – Channel number to get input setup
Notes
The most recent data collected is stored in session data in the structure:
>>> response.session['data'] {"mode": 'voltage', "excitation": 6.32e-05, "excitation_units": 'volts', "autorange": 'on', "range": 2000.0, "csshunt": 'on', "units": 'kelvin'}
- custom_pid(setpoint, heater, channel, P, I, update_time, sample_heater_range=10e-3, test_mode=False)[source]
Process - Set custom software PID parameters for servo control of fridge using still or sample heater. Currently only P and I implemented.
- Parameters:
setpoint (float) – Setpoint in Kelvin
heater (str) – ‘still’ or ‘sample’
channel (int) – LS372 Channel to PID off of
P (float) – Proportional value in Watts/Kelvin
I (float) – Integral Value in Hz
update_time (float) – Time between PID updates in seconds
sample_heater_range (float) – Range for sample heater in Amps. Default is 10e-3.
test_mode (bool, optional) – Run the Process loop only once. This is meant only for testing. Default is False.
Notes
The most recent data collected is stored in session data in the structure. The channel number noted below depends upon which channel is being used to servo:
>>> response.session['data'] {"fields": {"Channel_02": {"T": 293.644, "R": 33.752, "timestamps": 1601924482.722671}} }
- check_temperature_stability(measurements, threshold)[source]
Check servo temperature stability is within threshold.
- Parameters:
measurements (int) – number of measurements to average for stability check
threshold (float) – amount within which the average needs to be to the setpoint for stability
- set_output_mode(heater, mode)[source]
Task - Set output mode of the heater.
- Parameters:
heater (str) – Name of heater to set range for, either ‘sample’ or ‘still’.
mode (str) – Specifies mode of heater. Can be “Off”, “Monitor Out”, “Open Loop”, “Zone”, “Still”, “Closed Loop”, or “Warm up”
- set_heater_output(heater, output, display=None)[source]
Task - Set display type and output of the heater.
- Parameters:
heater (str) – Name of heater to set range for, either ‘sample’ or ‘still’.
output (float) – Specifies heater output value. For possible values see
socs.Lakeshore.Lakeshore372.Heater.set_heater_output()
display (str, optional) – Specifies heater display type. Can be “current” or “power”. If None, heater display is not reset before setting output.
Notes
For the still heater this sets the still heater manual output, not the still heater still output. Use
LS372_Agent.set_still_output()
instead to set the still output.
- set_still_output(output)[source]
Task - Set the still output on the still heater. This is different than the manual output on the still heater. Use
LS372_Agent.set_heater_output()
for that.- Parameters:
output (float) – Specifies still heater output value as a percentage. Can be any number between 0 and 100.
Supporting APIs
For the API all methods should start with one of the following:
set - set a parameter of arbitary input (i.e. set_excitation)
get - get the status of a parameter (i.e. get_excitation)
enable - enable a boolean parameter (i.e. enable_autoscan)
disable - disbale a boolean parameter (i.e. disable_channel)
- class socs.Lakeshore.Lakeshore372.LS372(ip, timeout=10, num_channels=16)[source]
Lakeshore 372 class.
- channels - list of channels, index corresponds to channel number with
index 0 corresponding to the control channel, ‘A’
- msg(message)[source]
Send message to the Lakeshore 372 over ethernet.
If we’re asking for something from the Lakeshore (indicated by a ? in the message string), then we will attempt to ask twice before giving up due to potential communication timeouts.
- Parameters:
message (str) – Message string as described in the Lakeshore 372 manual.
- Returns:
Response string from the Lakeshore, if any. Else, an empty string.
- Return type:
str
- get_temp(unit=None, chan=-1)[source]
Get temperature from the Lakeshore.
- Parameters:
unit (str) – Unit to return reading for (‘ohms’ or ‘kelvin’)
chan (str) – Channel to query, -1 for currently active channel
- Returns:
The reading from the lakeshore, either in ohms or kelvin.
- Return type:
float
- get_autoscan()[source]
Determine state of autoscan.
- Returns:
state of autoscanner
- Return type:
bool
- enable_autoscan()[source]
Enable the autoscan feature of the Lakeshore 372.
Will query active channel to pass already selected channel to SCAN command.
- disable_autoscan()[source]
Disable the autoscan feature of the Lakeshore 372.
Will query active channel to pass already selected channel to SCAN command.
- class socs.Lakeshore.Lakeshore372.Channel(ls, channel_num)[source]
Lakeshore 372 Channel Object
- Parameters:
ls (LS372 Object) – Lakeshore unit for communication
channel_num (int) – The channel number (1-8 or 1-16 depending on scanner type)
- get_input_channel_parameter()[source]
Run Input Channel Parameter Query
Input channel parameters include: off/on - Specifies whether the input/channel is disabled or enabled type off/on - bool dwell - Specifies a value for the autoscanning dwell time 1 to 200 s type dwell - int in units of seconds pause - Specifies a value for the change pause time: 3 to 200 s type pause - int in units of seconds curve number - Specifies which curve the channel uses type curve number - int tempco - Sets the temperature coefficien that will be used for temperature control if no curve is selected type tempco - str
- Returns:
response from INSET? command
Reference: LakeShore 372 Manual - pg177
- get_input_setup()[source]
Run Input Setup Query, storing results in human readable format.
Input setup parameters include: mode - Sensor excitation mode. Measurement input: 0 = Voltage Excitation Mode, 1 = Current Excitation Mode Control input (channel A): 1 = Current Excitation type mode - int excitation - Measurement input excitation range type excitation - int autorange - Specifies if auto range is enabled. 0 = off, 1 = autorange current, 2 = ROX102B Autorange (control input only) type autorange - int range - Measurement input resistance. Ignored for control input. type range - int cs shunt - Current source shunt. 0 = current source not shunted, excitation on 1 = current source shunted, excitation off type cs shunt - int units - Specifies the preferred units parameter for sensor readings and for the control setpoint: 1 = kelvin, 2 = ohms type units - int
- Returns:
response from INTYPE? command
Reference: LakeShore 372 Manual - pg178-179
- get_excitation_mode()[source]
Get the excitation mode form INTYPE?
- Returns:
excitation mode, ‘current’ or ‘voltage’
- Return type:
str
- set_excitation_mode(excitation_mode)[source]
Set the excitation mode to either voltage excitation or current exitation.
- Parameters:
excitation_mode (str) – mode we want, must be ‘current’ or ‘voltage’
- Returns:
reply from INTYPE call
- Return type:
str
- get_excitation()[source]
Get excitation value from INTYPE?
- Returns:
excitation value in volts or amps, depending on mode
- Return type:
float
- set_excitation(excitation_value)[source]
Set voltage/current exitation to specified value via INTYPE command.
- Parameters:
excitation_value (float) – value in volts/amps of excitation
- Returns:
response from INTYPE command
- Return type:
str
- set_resistance_range(resistance_range)[source]
Set the resistance range.
- Parameters:
resistance_range (float) – range in ohms we want to measure. Doesn’t need to be exactly one of the options on the lakeshore, will select closest valid range, though note these are in increments of 2, 6.32, 20, 63.2, etc.
- Returns:
response from INTYPE command
- Return type:
str
- get_resistance_range()[source]
Get the resistance range.
- Returns:
resistance range in Ohms
- Return type:
float
- enable_excitation()[source]
Enable excitation by not shunting the current source via INTYPE command.
- Returns:
state of excitation
- Return type:
str
- disable_excitation()[source]
Disable excitation by shunting the current source via INTYPE command.
- Returns:
state of excitation
- Return type:
str
- get_excitation_power()[source]
Get the most recent power calculation for the channel via RDGPWR? command.
- Returns:
power in Watts
- Return type:
float
- set_units(units)[source]
Set preferred units using INTYPE command.
- Parameters:
units (str) – preferred units parameter for sensor readings, ‘kelvin’ or ‘ohms’
- Returns:
response from INTYPE command
- Return type:
str
- get_units()[source]
Get preferred units from INTYPE? command.
- Returns:
preferred units
- Return type:
str
- enable_channel()[source]
Enable channel using INSET command.
- Returns:
response from self._set_input_channel_parameter()
- Return type:
str
- disable_channel()[source]
Disable channel using INSET command.
- Returns:
response from self._set_input_channel_parameter()
- Return type:
str
- set_dwell(dwell)[source]
Set the autoscanning dwell time.
- Parameters:
dwell (int) – Dwell time in seconds
- Returns:
response from self._set_input_channel_parameter()
- Return type:
str
- get_dwell()[source]
Get the autoscanning dwell time.
- Returns:
the dwell time in seconds
- Return type:
int
- set_pause(pause)[source]
Set pause time.
- Parameters:
pause (int) – Pause time in seconds
- Returns:
response from self._set_input_channel_parameter()
- Return type:
str
- get_pause()[source]
Get the pause time from INSET.
- Returns:
the pause time in seconds
- Return type:
int
- set_calibration_curve(curve_number)[source]
Set calibration curve using INSET.
Note: If curve doesn’t exist, curve number gets set to 0.
- Parameters:
curve_number (int) – Curve number for temperature conversion
- get_calibration_curve()[source]
Get calibration curve number using INSET?
- Returns:
curve number in use for the channel
- Return type:
int
- set_temperature_coefficient(coefficient)[source]
Set tempertaure coefficient with INSET.
- Parameters:
coefficient (str) – set coefficient to be used for temperature control if no curve is selected, either ‘negative’ or ‘positive’
- Returns:
response from _set_input_channel_parameter()
- Return type:
str
- get_temperature_coefficient()[source]
Get temperature coefficient from INSET?
- Returns:
temperature coefficient
- get_sensor_input_name()[source]
Run Sensor Input Name Query
- Returns:
response from INNAME? command
- Return type:
str
- set_sensor_input_name(name)[source]
Set sensor input name using INNAME.
Note: ‘,’ and ‘;’ characters are sanatized from input
- Parameters:
name (str) – name to give input channel
- get_kelvin_reading()[source]
Get temperature reading from channel.
- Returns:
temperature from channel in Kelvin
- Return type:
float
- get_resistance_reading()[source]
Get resistence reading from channel.
- Returns:
resistance from channel in Ohms
- Return type:
float
- get_reading_status()[source]
Get status of input reading.
- Returns:
list of errors on reading (or None if no errors)
- Return type:
list of str
- get_sensor_reading()[source]
Get sensor reading from channel.
- Returns:
resistance from channel in Ohms
- Return type:
float
- set_temperature_limit(limit)[source]
Set temperature limit in kelvin for which to shutdown all control outputs when exceeded. A temperature limit of zero turns the temperature limit feature off for the given sensor input.
- Parameters:
limit (float) – temperature limit in kelvin
- Returns:
response from TLIMIT command
- Return type:
str
- class socs.Lakeshore.Lakeshore372.Curve(ls, curve_num)[source]
Calibration Curve class for the LS372.
- get_header()[source]
Get curve header description.
- Returns:
response from CRVHDR? in list
- Return type:
list of str
- get_name()[source]
Get the curve name with the CRVHDR? command.
- Returns:
The curve name
- Return type:
str
- set_name(name)[source]
Set the curve name with the CRVHDR command.
- Parameters:
name (str) – The curve name, limit of 15 characters, longer names get truncated
- Returns:
the response from the CRVHDR command
- Return type:
str
- get_serial_number()[source]
Get the curve serial number with the CRVHDR? command.”
- Returns:
The curve serial number
- Return type:
str
- set_serial_number(serial_number)[source]
Set the curve serial number with the CRVHDR command.
- Parameters:
serial_number – The curve serial number, limit of 10 characters, longer serials get truncated
- Returns:
the response from the CRVHDR command
- Return type:
str
- get_format()[source]
Get the curve data format with the CRVHDR? command.”
- Returns:
The curve data format
- Return type:
str
- set_format(_format)[source]
Set the curve format with the CRVHDR command.
- Parameters:
_format – The curve format, valid formats are: “Ohm/K (linear)” “log Ohm/K (linear)” “Ohm/K (cubic spline)”
- Returns:
the response from the CRVHDR command
- Return type:
str
- get_limit()[source]
Get the curve temperature limit with the CRVHDR? command.
- Returns:
The curve temperature limit
- Return type:
str
- set_limit(limit)[source]
Set the curve temperature limit with the CRVHDR command.
- Parameters:
limit (float) – The curve temperature limit
- Returns:
the response from the CRVHDR command
- Return type:
str
- get_coefficient()[source]
Get the curve temperature coefficient with the CRVHDR? command.
- Returns:
The curve temperature coefficient
- Return type:
str
- set_coefficient(coefficient)[source]
Set the curve temperature coefficient with the CRVHDR command.
- Parameters:
coefficient – The curve temperature coefficient, either ‘positive’ or ‘negative’
- Returns:
the response from the CRVHDR command
- Return type:
str
- get_data_point(index)[source]
Get a single data point from a curve, given the index, using the CRVPT? command.
The format for the return value, a 3-tuple of floats, is chosen to work with how the get_curve() method later stores the entire curve in a numpy structured array.
- Parameters:
index (int) – index of breakpoint to query
- Returns:
(units, tempertaure, curvature) values for the given breakpoint
- Return type:
3-tuple of floats
- get_curve(_file=None)[source]
Get a calibration curve from the LS372.
If _file is not None, save to file location.
- class socs.Lakeshore.Lakeshore372.Heater(ls, output)[source]
Heater class for LS372 control
- Parameters:
ls (Lakeshore372.LS372) – the lakeshore object we’re controlling
output (int) – the heater output we want to control, 0 = sample, 1 = warm-up, 2 = still
- get_output_mode()[source]
Query the heater mode using the OUTMODE? command.
- Returns:
6-tuple with output mode, input channel, whether powerup is enabled, polarity, unfiltered/filtered, and the autoscanning delay time.
- Return type:
tuple
- set_mode(mode)[source]
Set output mode with OUTMODE commnd.
- Parameters:
mode (str) – control mode for heater, see page 171 of LS372 Manual for valid modes, as it changes per output
- Returns:
the response from the OUTMODE command
- get_input_channel()[source]
Get the control channel with the OUTMODE? command.
- Returns:
The control channel
- Return type:
str
- set_input_channel(_input)[source]
Set the control channel with the OUTMODE command.
- Parameters:
_input (str or int) – specifies which input or channel to control from
- set_powerup(powerup)[source]
- Parameters:
powerup (bool) – specifies whether the output remains on or shuts off after power cycle. True for on after powerup
- set_polarity()[source]
- Parameters:
polarity (str) – specifies output polarity: ‘unipolar’ or ‘bipolar’
- set_filter(_filter)[source]
- Parameters:
_filter (bool) – specifies controlling on unfiltered or filtered readings, True = filtered, False = unfiltered
- set_delay(delay)[source]
- Parameters:
delay (int) – delay in seconds for setpoint change during autoscanning, 1-255 seconds
- set_heater_display(display)[source]
- Parameters:
display (string) – Display mode for heater. Can either be ‘current’ or ‘power’.
- set_heater_output(output, display_type=None)[source]
Set heater output with MOUT command.
- Parameters:
output (float) – heater output value. If display is ‘power’, value should be in Watts. If ‘current’, value should be in percent. If this is the still heater, value should be percent of max voltage (10 V).
display_type (string) – Display type if you want to set this before setting heater. Can be ‘power’ or ‘current’ if output is sample or warm-up heater.
- Returns:
heater output
- Return type:
float
- get_sample_heater_output()[source]
Get sample heater output in percent of current or in actual power, depending on the heater output selection.
- Returns:
Sample heater output percentage.
- get_heater_setup()[source]
Gets Heater setup params with the HTRSET? command.
- Return resp:
List of values that have been returned from the Lakeshore.
- set_heater_range(_range)[source]
Set heater range with RANGE command.
- Parameters:
_range (float or str) – heater range in amps. Valid values are: “off”, “on”, 31.6e-6, 100e-6, 316e-6, 1e-3, 3.16e-3, 10e-3, 31.6e-3, 100e-3
- Returns:
heater range in amps
- Return type:
float
- get_heater_range()[source]
Get heater range with RANGE? command.
- Returns:
heater range in amps
- Return type:
float