nkt_tools.select.Select

class nkt_tools.select.Select(portname=None)

Bases: object

__init__(portname=None)

Searches for connected NKT Select and defines instrument parameters.

Make sure devices are not connected via another program already.

Parameters:

portname (str, optional) – Enter if portname for Select is known/multiple lasers are connected. If not supplied, system searches for Select. None by default.

Raises:

RuntimeError – Throws error if multiple NKT Selects are found on one computer. Supply portname for desired Select if multiple present.

Methods

__init__([portname])

Searches for connected NKT Select and defines instrument parameters.

print_status()

Read system status in bytes, translate to str, print.

read_all_properties()

Attributes

crystal_1_max_wavelength

crystal_1_min_wavelength

crystal_2_max_wavelength

crystal_2_min_wavelength

device_type

This should update to 104 (0x67) if init is right.

module_address

# 16 for Select.

monitor_1_gain

monitor_1_readout

monitor_2_gain

monitor_2_readout

monitor_switch

portname

COM port for laser.

rf_switch

status_messages

system status translation bits > string.

property device_type

This should update to 104 (0x67) if init is right. Assigned and checked during object init.

Type:

int, read-only

property module_address

# 16 for Select. Auto searches in init.

Type:

int, read-only

property portname

COM port for laser. Autofound during init if not given. User can supply when creating object.

Type:

str, read-only

print_status()

Read system status in bytes, translate to str, print.

Reads system status using registerReadU16 on register 0x66. Translates binary into str for of equipment status through Varia.status_messages.

Returns:

str – binary results of register read in string format.

Return type:

bits

status_messages = {0: '-', 1: 'Interlock off', 2: 'Interlock loop in', 3: 'Interlock loop out', 4: '-', 5: 'Supply voltage low', 6: 'Module temp range', 7: '-', 8: 'Shutter sensor 1', 9: 'Shutter sensor 2', 10: 'New crystal1 temperature', 11: 'New crystal2 temperature', 12: '-', 13: '-', 14: '-', 15: 'Error code present'}

system status translation bits > string.

Type:

dict