Positioner calibration

Positioners are shipped calibrated but it’s possible that the calibration needs to be redone over their lifetime. The calibration procedure runs through the motor, datums, and cogging calibrations, and then saves the configuration to the positioner EPROM.

Performing calibration on a positioner

The calibration steps can be commanded independently while in normal mode (no bootloader):

Normally the calibration is done using the calibrate_positioner coroutine. For example

>>> from jaeger import FPS
>>> from jaeger.commands import calibrate_positioner
>>> fps = await FPS().initialise()
>>> calibrate_positioner(fps, 31)

This can be conveniently run from the command line as

$ jaeger calibrate 31

API

async jaeger.commands.calibration.calibrate_positioner(fps, positioner_id, motors=True, datums=True, cogging=True)[source]

Runs the calibration process and saves it to the internal memory.

Parameters
  • fps (FPS) – The instance of FPS that will receive the trajectory.

  • positioner_id (int) – The ID of the positioner to calibrate.

  • motors (bool) – Whether to perform the motor calibration.

  • datums (bool) – Whether to perform the datums calibration.

  • cogging (bool) – Whether to perform the cogging calibration (may take more than one hour).

Raises

JaegerError – If encounters a problem during the process.

Examples

>>> fps = FPS()
>>> await fps.initialise()

# Calibrate positioner 31.
>>> await calibrate_positioner(fps, 31)
class jaeger.commands.calibration.StartDatumCalibration(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source]

Bases: jaeger.commands.base.Command

Indicates that the transmission for the trajectory has ended.

class jaeger.commands.calibration.StartMotorCalibration(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source]

Bases: jaeger.commands.base.Command

Aborts sending a trajectory.

class jaeger.commands.calibration.StartCoggingCalibration(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source]

Bases: jaeger.commands.base.Command

Starts the trajectories.

class jaeger.commands.calibration.SaveInternalCalibration(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source]

Bases: jaeger.commands.base.Command

Stop the trajectories.

class jaeger.commands.calibration.GetOffset(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source]

Bases: jaeger.commands.base.Command

Gets the motor offsets.

get_offsets()[source]

Returns the alpha and beta offsets, in degrees.

Raises

ValueError – If no reply has been received or the data cannot be parsed.

class jaeger.commands.calibration.SetOffsets(alpha=0, beta=0, **kwargs)[source]

Bases: jaeger.commands.base.Command

Sets the motor offsets.

class jaeger.commands.calibration.HallOn(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source]

Bases: jaeger.commands.base.Command

Turns hall sensors ON.

class jaeger.commands.calibration.HallOff(positioner_id, loop=None, timeout=None, done_callback=None, n_positioners=None, data=None)[source]

Bases: jaeger.commands.base.Command

Turns hall sensors ON.