FLS Agent
The Frequency-selectable Laser Source (FLS) is a calibrator that uses the Toptica TeraScan 1550 laser system, installed in a setup with attenuating prisms and mirrors. The calibrator is used for passband measurements with detectors that are sensitive to 20 GHz - 1 THz frequencies.
usage: python3 agent.py [-h] [--ip IP] [--port PORT] [--mode {init,acq}]
Agent Options
- --ip
- --port
Default: 1998
- --mode
Possible choices: init, acq
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 FLS for use with OCS you need to add an FLSAgent block to your ocs configuration file. Here is an example configuration block:
{'agent-class': 'FLSAgent',
'instance-id': 'fls',
'arguments': ['--ip', '169.254.18.24',
'--port', '1998',
'--mode', 'acq']}
Each device requires configuration under ‘agent-instances’. See the OCS site configs documentation for more details.
Docker Compose
The FLS Agent should be configured to run in a Docker container. An example configuration is:
ocs-fls-agent:
image: simonobs/socs:latest
hostname: ocs-docker
network_mode: "host"
environment:
- INSTANCE_ID=fls
- SITE_HUB=ws://127.0.0.1:8001/ws
- SITE_HTTP=http://127.0.0.1:8001/call
volumes:
- ${OCS_CONFIG_DIR}:/config:ro
Example Clients and Procedures
Below are some example use cases for using this agent.
Starting up the FLS
Note
All operations that require you to physically touch the instrument should be performed while wearing a grounding strap.
The startup procedure is as follows:
At the back of the DLC Smart unit, manually flip the power switch. This will cause the unit to boot up, which will take about 1 minute. When the system is ready, it will produce a series of audible tones, and the light under “System Ready” on the front of the unit will flash green.
Start the FLS Agent. This will initialize the connection. The DLC Smart unit will produce a series of audible tones, and the Agent will begin data acquisition.
To ensure that the voltage bias is set to zero:
client.set_bias(bias='zero')Ensure that the U-shaped link is removed from the BNC breakout box, then turn on the lasers:
client.toggle_laser_power(state='on')toggle_laser_power includes a 10-second countdown for the user to abort toggling the power if the U-shaped link has not been removed. An abort button will appear in the Task window for toggle_laser_power on OCS-web. Once the Task completes, the white lights on top of the laser units will turn on if this operation is successful.
Connect the PDA-S power supply to mains (i.e. by inserting the green block connector into the PDA-S unit).
Insert the U-shaped link into the BNC breakout box, closing the voltage bias line to the transmitter photomixer.
Set the bias voltage to the default values:
client.set_bias(bias='default')
Once this procedure is complete, the system is on and ready to use.
Note
Although you can perform basic operations such as alignment with the system immediately after startup, the lasers will not reach full power until about 1 hour after they are turned on. The frequency will also drift as the lasers warm up, so it is best to wait at least 36 hours from system startup to make any scientific measurements.
Setting the laser frequency
To set the frequency of the lasers:
client.set_frequency(frequency=100.0)
This will change the transmitter frequency. It will take a few seconds to reach the correct frequency.
Running frequency sweeps
Begin by setting the laser frequency to the frequency you want to start your sweep at:
client.set_frequency(frequency=120.0)
This Task concludes when the command is sent to the DLC Smart (not when the actual frequency reaches the correct value). Then, start your frequency sweeps (i.e. changing the frequency between two set endpoints):
client.run_frequency_sweeps.start(min_frequency=120.0,
max_frequency=160.0,
start_direction=1,
frequency_step=0.05)
Here, min_frequency, max_frequency, and frequency_step are
in units of GHz. start_direction determines which direction the sweep will
go, where 1 means that the laser frequency will increase during the sweep,
and -1 means that the laser frequency will decrease during the sweep.
num_of_sweeps is an integer number of times that you want to sweep across
the frequency region, where the direction of the sweep will reverse each time (i.e.
if the first sweep has increasing frequency, the second sweep will have decreasing
frequency).
Shutting down the FLS
Note
All operations that require you to physically touch the instrument should be performed while wearing a grounding strap.
The shutdown procedure is as follows:
Set the voltage bias to zero:
client.set_bias(bias='zero')Put on a grounding strap. Remove the U-shaped link from the BNC Breakout Box.
While wearing the grounding strap, disconnect the PDA-S power supply to mains (i.e. by removing the green block connector from the PDA-S unit).
Turn off the lasers:
client.toggle_laser_power(state='off')toggle_laser_power includes a 10-second countdown for the user to abort toggling the power if the U-shaped link has not been removed. An abort button will appear in the Task window for toggle_laser_power on OCS-web. Once the task completes, the lights on the tops of the lasers will turn off.
Stop the Agent from running.
While wearing the grounding strap, turn off the DLC Smart using the power switch on the back of the instrument.
Agent API
- class socs.agents.fls.agent.FLSAgent(agent, ip, port=1998)[source]
Agent for operating the lasers in the Frequency-selectable Laser Source (FLS) calibrator instrument for passband measurements.
- Parameters:
ip (str) – IP address for the DLC Smart laser controller
port (int, optional) – TCP port for DLC Smart communication. Default is 1998
- initialize(auto_acquire=False)[source]
Task - Initialize the connection to the DLC Smart
- Parameters:
auto_acquire (bool) – If True, start acquisition immediately after initialization. Default value is False.
- acq(test_mode=False)[source]
Process - Starts the ‘sampling’ data acquisition from the DLC Smart.
- Parameters:
mode (test) – If True, the acquisition loop breaks after one iteration.
Notes
The data collected are stored in session data in the structure:
>> response.session['data'] {'set_frequency': 110.0, 'actual_frequency': 109.3425, 'photocurrent': 0.1124, 'bias_voltage': 0.999834227, 'bias_offset': -0.498235892, 'lasers_on': True, 'scan_mode': 'fast', 'scan_min_frequency': 120.0, 'scan_max_frequency': 180.0, 'scan_step': 0.05, 'scan_direction': 1, 'integration_time': 299.3421 'timestamp': 1771277799.562098}
- toggle_laser_power(state)[source]
Task - Enable or disable emission from both lasers
- Parameters:
state (str) – State (‘on’ or ‘off’) to set the lasers to
- set_bias(bias)[source]
Task - Set the bias amplitude and offset of the lasers to a preset condition.
- Parameters:
bias (str) – Preset condition to set the bias for the lasers. Options are ‘zero’ to set the bias to zero, or ‘default’ to set the bias to default. The default bias amplitude is 1.0, and the default bias offset is -0.5.
- set_integration_time(integration_time)[source]
Task - Set the integration time of the laser system. Time is in milliseconds.
- Parameters:
integration_time (float) – The integration time in milliseconds.
- set_frequency(frequency)[source]
Task - Set the frequency of the laser system. Frequency must be between 20 GHz and 880 GHz.
- Parameters:
frequency (float) – The frequency to set the laser to.
- run_frequency_sweeps(min_frequency, max_frequency, start_direction, frequency_step, num_of_sweeps)[source]
Task - Run frequency sweeps between the two frequency values.
- Parameters:
min_frequency (float) – Minimum frequency for the sweeps (GHz).
max_frequency (float) – Maximum frequency for the sweeps (GHz).
start_direction (int) – Indicates increasing or decreasing frequency. Use start_direction = 1 for increasing frequency, or start_direction = -1 for decreasing frequency
frequency_step (float) – Step size between frequencies during the sweep (GHz). Must be at least 0.01 GHz.
int_time (float) – Integration time for each step of the sweep (ms). Default chooses the last set integration time.
Note
This task only sends commands to the DLC Smart, it does not wait for the end of the frequency sweep. As a result, it returns quickly, and the user needs to call the stop separately using stop_frequency_sweep.