Polarisation controller

PolarisationController module for qosst-hal.

class qosst_hal.polarisation_controller.FakePolarisationController(_location: Any, **_kwargs)

Fake Polarisation Controller, to use as a dummy.

__str__() str

Return str(self).

close() None

Close the fake hardware (do nothing).

get_position(channel: PolarisationControllerChannel = PolarisationControllerChannel.HWP) float

Return the position for the channel. In this case always return 0 (Fake hardware).

Parameters:

channel (PolarisationControllerChannel, optional) – channel to get the position from. Defaults to PolarisationControllerChannel.HWP.

Returns:

this fake hardware always returns 0.

Return type:

float

home()

Do nothing (Fake hardware).

move_by(increment: float, channel: PolarisationControllerChannel = PolarisationControllerChannel.HWP)

Move the designated channel by the increment. The increment unit will depend on the hardware.

In the case of the fake hardware, do nothing.

Parameters:
  • increment (float) – value to move by.

  • channel (PolarisationControllerChannel, optional) – channel of the polarisation controller to move. Defaults to PolarisationControllerChannel.HWP.

move_to(position: float, channel: PolarisationControllerChannel = PolarisationControllerChannel.HWP)

Move the designated channel to the position. The position unit will depend on the hardware.

In the case of the fake hardware, do nothing.

Parameters:
  • position (float) – value to move to.

  • channel (PolarisationControllerChannel, optional) – channel of the polarisation controller to move. Defaults to PolarisationControllerChannel.HWP.

open() None

Open the fake hardware (do nothing).

class qosst_hal.polarisation_controller.GenericPolarisationController(_location: Any, **_kwargs)

A Generic Polarisation controller class.

A polarisation controler should implement the following methods:

  • move_by: move the channel by the given increment.

  • move_to: move the channel to the given position.

  • open: open the hardware.

  • close: close the hardware.

__init__(_location: Any, **_kwargs) None

All parameters are ignored.

__str__() str

Return str(self).

abstract get_position(channel: PolarisationControllerChannel = PolarisationControllerChannel.HWP) float

Return the current position of the channel given in parameter. The unit will depend on the hardware.

Parameters:

channel (PolarisationControllerChannel, optional) – channel of the polarisation controller to get. Defaults to PolarisationControllerChannel.HWP.

Returns:

position of the channel.

Return type:

float

abstract home()

Move the polarisation controller to its home position.

abstract move_by(increment: float, channel: PolarisationControllerChannel = PolarisationControllerChannel.HWP)

Move the designated channel by the increment. The increment unit will depend on the hardware.

Parameters:
  • increment (float) – value to move by.

  • channel (PolarisationControllerChannel, optional) – channel of the polarisation controller to move. Defaults to PolarisationControllerChannel.HWP.

abstract move_to(position: float, channel: PolarisationControllerChannel = PolarisationControllerChannel.HWP)

Move the designated channel to the position. The position unit will depend on the hardware.

Parameters:
  • position (float) – value to move to.

  • channel (PolarisationControllerChannel, optional) – channel of the polarisation controller to move. Defaults to PolarisationControllerChannel.HWP.

class qosst_hal.polarisation_controller.PolarisationControllerChannel(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)

Channels for a fairly regular polarisation controller composed of a quarter wave plate, followed by an half wave plate, followed by another quarte wave plate.

HWP = 'Half Wave Plate'

Half Wave Plate (HWP).

QWP_1 = 'Quarter Wave Plate 1'

Quarter Wave Plate (QWP) 1.

QWP_2 = 'Quarter Wave Plate 2'

Quarter Wave Plate (QWP) 1.