dodal.devices.beamlines.i19.access_controlled.attenuator_motor_squad.AttenuatorMotorPositions#

class dodal.devices.beamlines.i19.access_controlled.attenuator_motor_squad.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

no_keys_clash()

validated_and_complete()

Reports back the validated combined position information.

Attributes

model_config

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

continuous_positions

discrete_indices

validated_and_complete() dict[str, int | float][source]#

Reports back the validated combined position information.

Return type:

dict[str, Union[int, float]]

Returns:

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