Toptica
TopMode Diode Laser
- class instruments.toptica.TopMode(filelike)[source]
Communicates with a Toptica Topmode instrument.
The TopMode is a diode laser with active stabilization, produced by Toptica.
Example usage:
>>> import instruments as ik >>> tm = ik.toptica.TopMode.open_serial('/dev/ttyUSB0', 115200) >>> print(tm.laser[0].wavelength)
- class CharmStatus(*values)[source]
Enum containing valid charm statuses for the lasers
- failure = 3
- in_progress = 1
- success = 2
- un_initialized = 0
- class Laser(parent, idx)[source]
Class representing a laser on the Toptica Topmode.
Warning
This class should NOT be manually created by the user. It is designed to be initialized by the
Topmodeclass.- property charm_status
Gets the ‘charm status’ of the laser
- Returns:
The ‘charm status’ of the specified laser
- Type:
bool
- property correction_status
Gets the correction status of the laser
- Returns:
The correction status of the specified laser
- Type:
- property current_control_status
Gets the current control status of the laser
- Returns:
The current control status of the specified laser
- Type:
bool
- property enable
Gets/sets the enable/disable status of the laser. Value of
Trueis for enabled, andFalsefor disabled.- Returns:
Enable status of the specified laser
- Type:
bool
- property first_mode_hop_time
Gets the date and time of the first mode hop
- Returns:
The datetime of the first mode hop for the specified laser
- Type:
datetime
- property intensity
Gets the intensity of the laser. This property is unitless.
- Returns:
the intensity of the specified laser
- Units:
Unitless
- Type:
float
- property is_connected
Check whether a laser is connected.
- Returns:
Whether the controller successfully connected to a laser
- Type:
bool
- property latest_mode_hop_time
Gets the date and time of the latest mode hop
- Returns:
The datetime of the latest mode hop for the specified laser
- Type:
datetime
- property lock_start
Gets the date and time of the start of mode-locking
- Returns:
The datetime of start of mode-locking for specified laser
- Type:
datetime
- property mode_hop
Gets whether the laser has mode-hopped
- Returns:
Mode-hop status of the specified laser
- Type:
bool
- property model
Gets the model type of the laser
- Returns:
The model of the specified laser
- Type:
str
- property on_time
Gets the ‘on time’ value for the laser
- Returns:
The ‘on time’ value for the specified laser
- Units:
Seconds (s)
- Type:
- property production_date
Gets the production date of the laser
- Returns:
The production date of the specified laser
- Type:
str
- property serial_number
Gets the serial number of the laser
- Returns:
The serial number of the specified laser
- Type:
str
- property tec_status
Gets the TEC status of the laser
- Returns:
The TEC status of the specified laser
- Type:
bool
- property temperature_control_status
Gets the temperature control status of the laser
- Returns:
The temperature control status of the specified laser
- Type:
bool
- display(param)[source]
Sends a display command to the Topmode.
- Parameters:
param (str) – Parameter that will be sent with a display request
- Returns:
Response to the display request
- execute(command)[source]
Sends an execute command to the Topmode. This is used to automatically append (exec ‘ + command + ) to your command.
- Parameters:
command (str) – The command to be executed.
- reboot()[source]
Reboots the system (note that the serial connect might have to be re-opened after this)
- reference(param)[source]
Sends a reference commands to the Topmode. This is effectively a query request. It will append the required (param-ref ‘ + param + ).
- Parameters:
param (str) – Parameter that should be queried
- Returns:
Response to the reference request
- Return type:
str
- set(param, value)[source]
Sends a param-set command to the Topmode. This is used to automatically handle appending “param-set!” and the rest of the param-set message structure to your message.
- Parameters:
param (str) – Parameter that will be set
value (
str,tuple,list, orbool) – Value that the parameter will be set to
- property current_status
Gets the current controller board health status
- Returns:
Falseif there has been a failure for the current controller board,Trueotherwise- Type:
bool
- property enable
is the laser lasing? :return:
- property firmware
Gets the firmware version of the charm controller
- Returns:
The firmware version of the charm controller
- Type:
tuple
- property fpga_status
Gets the FPGA health status
- Returns:
Falseif there has been a failure for the FPGA,Trueotherwise- Type:
bool
- property interlock
Gets the interlock switch open state
- Returns:
Trueif interlock switch is open,Falseotherwise- Type:
bool
- property laser
Gets a specific Topmode laser object. The desired laser is specified like one would access a list.
For example, the following would print the wavelength from laser 1:
>>> import instruments as ik >>> import instruments.units as u >>> tm = ik.toptica.TopMode.open_serial('/dev/ttyUSB0', 115200) >>> print(tm.laser[0].wavelength)
- Return type:
- property locked
Gets the key switch lock status
- Returns:
Trueif key switch is locked,Falseotherwise- Type:
bool
- property serial_number
Gets the serial number of the charm controller
- Returns:
The serial number of the charm controller
- Type:
str
- property temperature_status
Gets the temperature controller board health status
- Returns:
Falseif there has been a failure for the temperature controller board,Trueotherwise- Type:
bool