Lakeshore 425
The Lakeshore Model 425 gaussmeter is a device which measure the magnetic field by hall sensor. This agent is used to measure the magnetic field from the superconducting magnetic bearing of the CHWP rotation mechanism and to monitoring the status of floating and rotating CHWP.
usage: python3 agent.py [-h] [--port PORT] [--mode {init,acq}]
[--sampling-frequency SAMPLING_FREQUENCY]
Agent Options
- --port
Path to USB node for the lakeshore
- --mode
Possible choices: init, acq
Starting action for the agent.
- --sampling-frequency
Sampling frequency for data acquisition
Configuration File Examples
Below are useful configurations examples for the relevant OCS files and for running the agent in a docker container.
OCS Site Config
To configure the ocs-lakeshore425-agent we need to add a Lakeshore425Agent block to our ocs configuration file. Here is an example configuration block using all of the available arguments:
{'agent-class': 'Lakeshore425Agent',
'instance-id': 'LS425',
'arguments': [
['--port', '/dev/LS425'],
['--mode', 'acq'],
['--sampling-frequency', 1.],
]},
If you would like to chanege the setting or check the status of the lakeshore 425, the --mode
argument should be 'init'
.
Docker Compose
The ocs-lakeshore425-agent can be run via a Docker container. The following is an example of what to insert into your institution’s docker-compose file.:
ocs-lakeshore425-agent:
image: simonsobs/socs:latest
hostname: ocs-docker
environment:
- INSTANCE_ID=LS425
device:
- /dev/LS425:/dev/LS425
volumes:
- ${OCS_CONFIG_DIR}:/config:ro
Agent API
- class socs.agents.lakeshore425.agent.LS425Agent(agent, port, f_sample=1.0)[source]
Agent for interfacing with a single Lakeshore 425 device.
- Parameters:
agent (ocs.ocs_agent.OCSAgent) – Instantiated OCSAgent class for this Agent
port (int) – Path to USB device in /dev/
f_sample (float) – Default sampling rate for the acq Process
- init_lakeshore(auto_acquire=False)[source]
Task - Perform first time setup of the Lakeshore 425 Module.
- Parameters:
auto_acquire (bool, optional) – Default is False. Starts data acquisition after initialization if True.
- acq(sampling_frequency=None)[source]
Process - Acquire data from the Lakeshore 425.
- Parameters:
sampling_frequency (float, optional) – Sampling frequency for data collection. Defaults to the value passed to –sampling_frequency on Agent startup
Notes
The most recent data collected is stored in session data in the structure:
>>> response.session['data'] {"fields": {"mag_field": {"Bfield": 270.644}, "timestamp": 1601924466.6130798} }