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:
ICommBackendWrapperHubner Cobolt MLD/DPL lasers.
- Parameters:
conn – serial connection parameters (usually port)
- Error
alias of
HubnerError
- 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 ifenabled==True, this command does not usually turn on the laser, and requires the key switch to be turned off and back on.
- 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
Noneif the mode can not be queried.
- 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_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_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, settinginclude=-10queries all available variables, which is equivalent toinclude="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, settinginclude=-10queries all available variables, which is equivalent toinclude="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, settinginclude=-10queries all available variables, which is equivalent toinclude="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:
DeviceErrorGeneric 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,DeviceBackendErrorGeneric 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.