photons.equipment.kinesis module

Base class for equipment that use the Kinesis SDK from Thorlabs.

class photons.equipment.kinesis.KinesisBase(record, **kwargs)[source]

Bases: BaseEquipment

Base class for equipment that use the Kinesis SDK from Thorlabs.

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: MotionControl
MOVING_CLOCKWISE = 16
MOVING_COUNTERCLOCKWISE = 32
JOGGING_CLOCKWISE = 64
JOGGING_COUNTERCLOCKWISE = 128
HOMING = 512
HOMED = 1024
MOVING = 752
static build_device_list()[source]

Builds the Thorlabs device list.

Only builds the device list once per application instance. This function can be called multiple times.

Return type:

None

get_position()[source]

Get the current position of the device.

Return type:

int | float

info()[source]

Return information about the device.

The subclass must populate the dict.

Return type:

dict

is_moving(delay=0.2)[source]

Returns whether the device moving.

Parameters:

delay (float) – The number of seconds to wait before checking whether the device is moving. Starting from rest, the motors take time to start moving the device and if this method is called too soon after requesting the device to move to a new position then the callback that checks the moving status might indicate that the motors are not currently moving.

Return type:

bool

set_position(position)[source]

Set the current position of the device.

Return type:

None

status_bits()[source]

Returns the device status bits.

This method gets called automatically in the registered callback.

Return type:

int

wait(timeout=None)[source]

Wait for the device to stop moving.

Parameters:

timeout (float) – The maximum number of seconds to wait. Default is to wait forever.

Return type:

None

class photons.equipment.kinesis.Signaler(kinesis)[source]

Bases: QObject

Qt Signaler for callbacks that are received from the DLL.

position_changed: SignalInstance
photons.equipment.kinesis.callback(signaler)[source]

Create a callback for the signaler.