SequenceContext

class caqtus.shot_compilation.SequenceContext(
device_configurations: Mapping[DeviceName, DeviceConfiguration],
parameter_schema: ParameterSchema,
time_lanes: TimeLanes,
)

Bases: object

Contains information about a sequence being compiled.

get_device_configuration(
device_name: DeviceName,
) DeviceConfiguration

Returns the configuration for the given device.

Raises:

KeyError – If no configuration is found for the given device.

get_all_device_configurations() Mapping[DeviceName, DeviceConfiguration]

Returns all device configurations available in this sequence.

get_parameter_schema() ParameterSchema

Returns the schema for the parameters of the sequence.

get_lane_by_name(
name: str,
) Success[TimeLane] | Failure[KeyError]

Returns the time lane with the given name.

get_lane(name: str) TimeLane

Returns the time lane with the given name.

Raises:
  • KeyError – If no lane with the given name is not found in the sequence

  • context.

get_lanes_with_type(
lane_type: type[LaneType],
) Mapping[str, LaneType]

Returns the lanes used during the shot with the given type.

get_step_names() tuple[str, ...]

Returns the names of the steps in the sequence.