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[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 Topmode class.

correction()[source]

Run the correction against the specified laser

charm_status

Gets the ‘charm status’ of the laser

Returns:The ‘charm status’ of the specified laser
Type:bool
correction_status

Gets the correction status of the laser

Returns:The correction status of the specified laser
Type:CharmStatus
current_control_status

Gets the current control status of the laser

Returns:The current control status of the specified laser
Type:bool
enable

Gets/sets the enable/disable status of the laser. Value of True is for enabled, and False for disabled.

Returns:Enable status of the specified laser
Type:bool
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
intensity

Gets the intensity of the laser. This property is unitless.

Returns:the intensity of the specified laser
Units:Unitless
Type:float
is_connected

Check whether a laser is connected.

Returns:Whether the controller successfully connected to a laser
Type:bool
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
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
mode_hop

Gets whether the laser has mode-hopped

Returns:Mode-hop status of the specified laser
Type:bool
model

Gets the model type of the laser

Returns:The model of the specified laser
Type:str
on_time

Gets the ‘on time’ value for the laser

Returns:The ‘on time’ value for the specified laser
Units:Seconds (s)
Type:Quantity
production_date

Gets the production date of the laser

Returns:The production date of the specified laser
Type:str
serial_number

Gets the serial number of the laser

Returns:The serial number of the specified laser
Type:str
tec_status

Gets the TEC status of the laser

Returns:The TEC status of the specified laser
Type:bool
temperature_control_status

Gets the temperature control status of the laser

Returns:The temperature control status of the specified laser
Type:bool
wavelength

Gets the wavelength of the laser

Returns:The wavelength of the specified laser
Units:Nanometers (nm)
Type:Quantity
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, or bool) – Value that the parameter will be set to
current_status

Gets the current controller board health status

Returns:False if there has been a failure for the current controller board, True otherwise
Type:bool
enable

is the laser lasing? :return:

firmware

Gets the firmware version of the charm controller

Returns:The firmware version of the charm controller
Type:tuple
fpga_status

Gets the FPGA health status

Returns:False if there has been a failure for the FPGA, True otherwise
Type:bool
interlock

Gets the interlock switch open state

Returns:True if interlock switch is open, False otherwise
Type:bool
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:Laser
locked

Gets the key switch lock status

Returns:True if key switch is locked, False otherwise
Type:bool
serial_number

Gets the serial number of the charm controller

Returns:The serial number of the charm controller
Type:str
temperature_status

Gets the temperature controller board health status

Returns:False if there has been a failure for the temperature controller board, True otherwise
Type:bool