pylablib.devices.LighthousePhotonics package

Submodules

pylablib.devices.LighthousePhotonics.base module

exception pylablib.devices.LighthousePhotonics.base.LighthousePhotonicsError[source]

Bases: pylablib.core.devio.base.DeviceError

Generic Lighthouse Photonics devices error

args
with_traceback()

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

exception pylablib.devices.LighthousePhotonics.base.LighthousePhotonicsBackendError(exc)[source]

Bases: pylablib.devices.LighthousePhotonics.base.LighthousePhotonicsError, pylablib.core.devio.comm_backend.DeviceBackendError

Generic Lighthouse Photonics backend communication error

args
with_traceback()

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

class pylablib.devices.LighthousePhotonics.base.TDeviceInfo(product, version, serial, configuration)

Bases: tuple

configuration
count()

Return number of occurrences of value.

index()

Return first index of value.

Raises ValueError if the value is not present.

product
serial
version
class pylablib.devices.LighthousePhotonics.base.TWorkHours(controller, laser)

Bases: tuple

controller
count()

Return number of occurrences of value.

index()

Return first index of value.

Raises ValueError if the value is not present.

laser
class pylablib.devices.LighthousePhotonics.base.SproutG(conn)[source]

Bases: pylablib.core.devio.comm_backend.ICommBackendWrapper

Lighthouse Photonics Sprout G laser.

Parameters:conn – serial connection parameters (usually port)
Error

alias of LighthousePhotonicsError

query(comm, allowed_replies=('0', ))[source]

Send a query to the device and parse the reply

get_device_info()[source]

Get device information (product name, product version, serial number, configuration)

get_work_hours()[source]

Return device operation hours (controller on) and run hours (laser on)

get_warning_status()[source]

Get device warnings

get_interlock_status()[source]

Get manual interlock status

get_shutter_status()[source]

Get manual shutter status ("open" or "close")

get_output_mode()[source]

Get output mode.

Can be "on", "off", "idle" (power standby mode), "calibrate", "interlock" (manual interlock is off), "warmup" (warmup mode), or "calibration" (calibration mode).

set_output_mode(mode='on')[source]

Set output mode.

mode can be "on", "off", "idle" (power standby mode), or "calibrate" (calibration mode).

is_enabled()[source]

Check if the output is on (idle or warmup don’t count as on)

enable(enabled=True)[source]

Turn the output on or off

get_output_power()[source]

Set the actual output power (in Watts)

get_output_setpoint()[source]

Get the output setpoint power (in Watts)

set_output_power(level)[source]

Get the output power setpoint (in Watts)

class NoParameterCaller(device, kind)

Bases: object

Class to simplify calling functions without a parameter

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)

Module contents