dodal.devices.beamlines.i19.attenuator_motor_positions.AttenuatorMotorPositions#

final class dodal.devices.beamlines.i19.attenuator_motor_positions.AttenuatorMotorPositions[source]#

Motor positions for attentuators in the attenuation system, be they indices on a discrete steps motor or continuous positions on an axis, or axes.

This is a validated dict which pairs off naming “tags” for each motor (e.g. “x” for a lateral x-axis motor or “w” for a filter wheel), with the corresponding int or float motor position ( or position demand / request ) as appropriate.

continuous_positions#

dict contributions pairing names of motors against the discrete motor position (likely to be in mm)/

discrete_indices#

dict contributions pairing names of index stepping positioners against the discrete position index (e.g. for a filter wheel).

Examples

( Given that i19 mounted a resin wedge on their x-axis motor,

an aluminium wedge on their y-axis motor and their first filter wheel we will name “w” … )

Request for motor changes:

{“x”: 20.4} and {“w”:3} might indicate a request to move x-axis to 20.4 mm and the wheel round to slot 3.

Reporting of system motor positions (on say i19, where wheel index 1 is reserved for an EMPTY slot): {“x”: 28.62, “y”: 5.0} and {“w”: 1} might indicate the resin wedge is at 28.62 mm, aluminium wedge is OUT, filter wheel at EMPTY (OUT).”

Parameters:

data (Any)

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:

data (Any)

Methods

is_empty()

no_keys_clash()

Attributes

model_config

Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].

validated_and_complete

Lazily evaluate the merged dict, post validation and cache for future use.

continuous_positions

discrete_indices

property validated_and_complete: dict[str, int | float]#

Lazily evaluate the merged dict, post validation and cache for future use.

Returns:

The validated union of both discrete motor index and continuous motor position contributions.