CameraCompiler

class caqtus.device.camera.CameraCompiler(
device_name: DeviceName,
sequence_context: SequenceContext,
)

Bases: TriggerableDeviceCompiler

Computes parameters for a camera device.

class CameraInitializationParameters

Bases: TypedDict

The parameters to pass to the camera constructor.

This dictionary contains the following keys:

  • roi: The region of interest of the sensor for the camera during the

    sequence.

  • external_trigger: Whether the camera should be triggered externally or

    not.

  • timeout: The maximum time to wait for the camera to be ready to take a

    picture.

compile_initialization_parameters() CameraInitializationParameters

Compile the parameters to pass to the device constructor.

class CameraShotParameters

Bases: TypedDict

The parameters to pass to the camera controller for a shot.

This dictionary contains the following keys:

  • timeout: The maximum time to wait for a picture to be taken.

  • picture_names: The names of the pictures to take, in the order they

    should be taken.

  • exposures: The exposure times of the pictures to take, in the order they

    should be taken. The number of exposures matches the number of pictures.

compile_shot_parameters(
shot_context: ShotContext,
) CameraShotParameters

Compile the parameters to pass to the camera controller for a shot.

The exposures for the pictures are computed from the duration of the corresponding blocks in the camera time lane.

compute_trigger(
sequencer_time_step: TimeStep,
shot_context: ShotContext,
) TimedInstruction[bool]

Compute the trigger for the camera.

For a camera, the trigger is high during the exposure time of each picture, and low in between.