pylablib.devices.Hubner package

Submodules

pylablib.devices.Hubner.Cobolt module

class pylablib.devices.Hubner.Cobolt.TDeviceInfo(serial, model, name, firmware_version, firmware_date, firmware_build_date)

Bases: tuple

firmware_build_date
firmware_date
firmware_version
model
name
serial
class pylablib.devices.Hubner.Cobolt.Cobolt(conn)[source]

Bases: ICommBackendWrapper

Hubner Cobolt MLD/DPL lasers.

Parameters:

conn – serial connection parameters (usually port)

Error

alias of HubnerError

query(comm, data_type='string', **kwargs)[source]

Send a query to the device and parse the reply

get_device_info()[source]

Get device information (serial number)

get_work_hours()[source]

Return device operation hours

get_baseplate_temperature()[source]

Return device base plate temperature (in C)

get_head_temperature()[source]

Return device head (TEC) temperature (in C)

abort_autostart()[source]

Abort autostart sequence

restart_autostart()[source]

Restart autostart sequence

is_autostart_enabled()[source]

Return whether the autostart sequence is enabled

get_error_state()[source]

Return the current error (fault) state

clear_error()[source]

Clear the error state

get_operating_mode()[source]

Return the operating mode

enable(enabled=True, autostart='auto')[source]

Enable or disable the output.

autostart determines whether the autostart-enabled command is used or not (if "auto", try both and ignore the errors). Note that if enabled==True, this command does not usually turn on the laser, and requires the key switch to be turned off and back on.

is_enabled()[source]

Check if the output is on

get_key_switch()[source]

Get the key switch state (True is on, False is off)

get_interlock()[source]

Get the interlock state (True is closed, False is open/fault)

set_output_mode(mode)[source]

Set output mode (“ccurrent”` for constant current, "cpower" for constant power, "mod" for modulation)

get_output_mode()[source]

Get output mode (“ccurrent”` for constant current, "cpower" for constant power, "mod" for modulation)

Can also return None if the mode can not be queried.

get_output_power_setpoint()[source]

Get output power setpoint (in W) in the constant power mode

set_output_power(setpoint, set_mode=True)[source]

Set output power setpoint (in W).

If set_mode==True, switch the device to the constant power mode.

get_max_output_power()[source]

Get the maximal output power

get_output_current_setpoint()[source]

Get output current setpoint (in A) in the constant current mode

set_output_current(setpoint, set_mode=True)[source]

Set output current setpoint (in A).

If set_mode==True, switch the device to the constant current mode.

get_max_output_current()[source]

Get the maximal output current

get_output_power()[source]

Get actual current output power (in W)

get_output_current()[source]

Get actual current drive current (in A)

is_analog_modulation_enabled()[source]

Check if the analog modulation is enabled

enable_analog_modulation(enabled=True)[source]

Enable or disable the analog modulations

is_digital_modulation_enabled()[source]

Check if the digital modulation is enabled

enable_digital_modulation(enabled=True)[source]

Enable or disable the digital modulations

get_modulation_power_setpoint()[source]

Get power setpoint (in W) in the modulation mode

set_modulation_power(setpoint)[source]

Set power setpoint (in W) in the modulation mode

get_analog_modulation_impedance()[source]

Get analog modulation input impedance ("50ohm" or "highZ")

set_analog_modulation_impedance(impedance)[source]

Set analog modulation input impedance ("50ohm" or "highZ")

apply_settings(settings)

Apply the settings.

settings is the dict {name: value} of the device available settings. Non-applicable settings are ignored.

close()

Close the backend

get_device_variable(key)

Get the value of a settings, status, or full info parameter

get_full_info(include=0)

Get dict {name: value} containing full device information (including status and settings).

include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or "all" (all available variables). Since the lowest priority is -10, setting include=-10 queries all available variables, which is equivalent to include="all".

get_full_status(include=0)

Get dict {name: value} containing the device status (including settings).

include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or "all" (all available variables). Since the lowest priority is -10, setting include=-10 queries all available variables, which is equivalent to include="all".

get_settings(include=0)

Get dict {name: value} containing all the device settings.

include specifies either a list of variables (only these variables are returned), a priority threshold (only values with the priority equal or higher are returned), or "all" (all available variables). Since the lowest priority is -10, setting include=-10 queries all available variables, which is equivalent to include="all".

is_opened()

Check if the device is connected

lock(timeout=None)

Lock the access to the device from other threads/processes (isn’t necessarily implemented)

locking(timeout=None)

Context manager for lock & unlock

open()

Open the backend

set_device_variable(key, value)

Set the value of a settings parameter

unlock()

Unlock the access to the device from other threads/processes (isn’t necessarily implemented)

pylablib.devices.Hubner.base module

exception pylablib.devices.Hubner.base.HubnerError[source]

Bases: DeviceError

Generic Hubner Photonics devices error

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

exception pylablib.devices.Hubner.base.HubnerBackendError(exc)[source]

Bases: HubnerError, DeviceBackendError

Generic Hubner Photonics backend communication error

add_note()

Exception.add_note(note) – add a note to the exception

args
with_traceback()

Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.

Module contents