photons.equipment.laser_superk module

SuperK Fianium laser from NKT Photonics.

class photons.equipment.laser_superk.ID60(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

Register IDs for “SK Fianium” (Module type 0x0060).

INLET_TEMPERATURE = 17
EMISSION = 48
MODE = 49
INTERLOCK = 50
PULSE_PICKER_RATIO = 52
WATCHDOG_INTERVAL = 54
POWER_LEVEL = 55
CURRENT_LEVEL = 56
NIM_DELAY = 57
SERIAL_NUMBER = 101
STATUS_BITS = 102
SYSTEM_TYPE = 107
USER_TEXT = 108
class photons.equipment.laser_superk.ID88(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

Register IDs for “SuperK G3 Mainboard” (Module type 0x0088).

INLET_TEMPERATURE = 17
EMISSION = 48
MODE = 49
INTERLOCK = 50
DATETIME = 51
PULSE_PICKER_RATIO = 52
WATCHDOG_INTERVAL = 54
CURRENT_LEVEL = 55
PULSE_PICKER_NIM_DELAY = 57
MAINBOARD_NIM_DELAY = 58
USER_CONFIG = 59
MAX_PULSE_PICKER_RATIO = 61
STATUS_BITS = 102
ERROR_CODE = 103
USER_TEXT = 141
class photons.equipment.laser_superk.ID61(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

Register IDs for “SuperK Front panel” (Module type 0x61).

PANEL_LOCK = 61
DISPLAY_TEXT = 114
ERROR_FLASH = 141
class photons.equipment.laser_superk.ID89(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

Register IDs for “SuperK G3 Front Panel” (Module type 0x0089).

According to the NKT engineers, there are no front-panel registers available. This means that the PANEL_LOCK, DISPLAY_TEXT and ERROR_FLASH do not exist.

class photons.equipment.laser_superk.OperatingModes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)[source]

Bases: IntEnum

The operating modes for a SuperK Fianium laser.

CONSTANT_CURRENT = 0
CONSTANT_POWER = 1
MODULATED_CURRENT = 2
MODULATED_POWER = 3
POWER_LOCK = 4
class photons.equipment.laser_superk.SuperK(record, **kwargs)[source]

Bases: BaseEquipment

SuperK Fianium laser from NKT Photonics.

Parameters:
  • record (EquipmentRecord) – The equipment record.

  • **kwargs – Keyword arguments. Can be specified as attributes of an XML element in a configuration file (with the tag of the element equal to the alias of record).

connection: NKT
class OperatingModes(value, names=<not given>, *values, module=None, qualname=None, type=None, start=1, boundary=None)

Bases: IntEnum

The operating modes for a SuperK Fianium laser.

CONSTANT_CURRENT = 0
CONSTANT_POWER = 1
MODULATED_CURRENT = 2
MODULATED_POWER = 3
POWER_LOCK = 4
DEVICE_ID = 15
FRONT_PANEL_ID = 1
MODULE_TYPE_0x60 = 96
MODULE_TYPE_0x88 = 136
level_changed: SignalInstance
emission_changed: SignalInstance
mode_changed: SignalInstance
emission(enable)[source]

Turn the laser emission on or off.

Parameters:

enable (bool) – Whether to turn the laser emission on or off.

Return type:

None

enable_constant_current_mode()[source]

Set the laser to be in constant current mode.

Return type:

None

enable_constant_power_mode()[source]

Set the laser to be in constant power mode.

Return type:

None

enable_modulated_current_mode()[source]

Set the laser to be in modulated current mode.

Return type:

None

enable_modulated_power_mode()[source]

Set the laser to be in modulated power mode.

Return type:

None

enable_power_lock_mode()[source]

Set the laser to be power lock (external feedback) mode.

Return type:

None

ensure_interlock_ok()[source]

Make sure that the interlock is okay.

Raises an exception if it is not okay, and it cannot be reset.

Return type:

bool

get_current_level()[source]

Returns the constant/modulated current level of the laser.

Return type:

float

get_feedback_level()[source]

Get the power lock (external feedback) level of the laser.

Return type:

float

get_operating_mode()[source]

Returns the operating mode of the laser.

Return type:

OperatingModes

get_operating_modes()[source]

Get all supported operating modes of the laser.

Return type:

dict[str, OperatingModes]

get_power_level()[source]

Returns the constant/modulated power level of the laser.

Return type:

float

get_temperature()[source]

Returns the temperature of the laser.

Return type:

float

get_user_text()[source]

Returns the custom user-text value.

Return type:

str

is_constant_current_mode()[source]

Whether the laser in constant current mode.

Return type:

bool

is_constant_power_mode()[source]

Whether the laser in constant power mode.

Return type:

bool

is_emission_on()[source]

Check if the laser emission is on or off.

Return type:

bool

is_modulated_current_mode()[source]

Whether the laser in modulated current mode.

Return type:

bool

is_modulated_power_mode()[source]

Whether the laser in modulated power mode.

Return type:

bool

is_power_lock_mode()[source]

Whether the laser in power lock (external feedback) mode.

Return type:

bool

lock_front_panel(lock)[source]

Lock the front panel so that the level cannot be changed manually.

Parameters:

lock (bool) – Whether to lock (True) or unlock (False) the front panel.

Return type:

bool

Returns:

Whether the request to (un)lock the front panel was successful. A laser with a module type 0x88 does not permit the front panel to be (un)locked and therefore this method will always return False for this laser.

set_current_level(percentage)[source]

Set the constant/modulated current level of the laser.

Parameters:

percentage (float) – The current level as a percentage 0 - 100 (resolution 0.1).

Return type:

float

Returns:

The actual current level that the laser is at.

set_feedback_level(percentage)[source]

Set the power-lock (external feedback) level of the laser.

Parameters:

percentage (float) – The power-lock level as a percentage 0 - 100 (resolution 0.1).

Return type:

float

Returns:

The power-lock level that the laser is at.

set_operating_mode(mode)[source]

Set the operating mode of the laser.

Parameters:

mode (int | str | OperatingModes) – The operating mode. Can be an OperatingModes value or member name.

Return type:

None

set_power_level(percentage)[source]

Set the constant/modulated power level of the laser.

Parameters:

percentage (float) – The power level as a percentage 0 - 100 (resolution 0.1).

Return type:

float

Returns:

The actual power level that the laser is at.

set_user_text(text)[source]

Set the custom user-text value.

Parameters:

text (str) – The text to write to the laser’s firmware. Only ASCII characters are allowed. The maximum number of characters is 20 for the laser with module type 0x60 and 240 characters for module type 0x88. The laser with module type 0x60 can display the text on the front panel (if selected from the menu option).

Return type:

str

Returns:

The text that was actually stored in the laser’s firmware.

disconnect_equipment()[source]

Unlock the front panel, set the user text to an empty string and close the port.

class photons.equipment.laser_superk.Signaler(device)[source]

Bases: QObject

Qt Signaler for callbacks that are received from the DLL.

device_status_changed: SignalInstance
register_status_changed: SignalInstance
port_status_changed: SignalInstance
maybe_emit_notification(*args, **kwargs)[source]

Notify all linked Clients.

Return type:

None

photons.equipment.laser_superk.register_callbacks(superk)[source]

Register the callbacks from the DLL.

Return type:

Signaler