bpm#

class ConfigModel(*, name, description=None, lattice_names=None, x_pos=None, y_pos=None, x_offset=None, y_offset=None, tilt=None)[source]#

Bases: ElementConfigModel

Configuration model for BPM element.

Parameters:
  • x_pos (str) – Horizontal position device catalog key

  • y_pos (str) – Vertical position device catalog key

  • x_offset (str) – Horizontal BPM offset device catalog key

  • y_offset (str) – Vertical BPM offset device catalog key

  • tilt (str) – BPM tilt device catalog key

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.

tilt: str | None#
x_offset: str | None#
x_pos: str | None#
y_offset: str | None#
y_pos: str | None#
class BPM(cfg)[source]#

Bases: Element

Class providing access to one BPM of a physical or simulated lattice

Construct a BPM

Parameters:
  • name (str) – Element name

  • model (BPMModel) – BPM model in charge of computing beam position

attach(peer, positions, offset, tilt)[source]#

Attach BPM attributes to a peer.

Parameters:
  • peer (object) – The peer object (simulator or control system)

  • positions (RBpmArray) – BPM position readings

  • offset (RWBpmOffsetArray) – BPM offset values for correction

  • tilt (RWBpmTiltScalar) – BPM tilt angle for rotation correction

Returns:

Self – A new attached instance of BPM

get_offset_devices()[source]#

Get device handles used for offset access

Returns:

list[DeviceAccess] – Array of DeviceAcess

get_pos_devices()[source]#

Get device handles used for position reading

Returns:

list[DeviceAccess] – Array of DeviceAcess

get_tilt_device()[source]#

Get device handle used for tilt access

Returns:

DeviceAccess – DeviceAcess

property offset: ReadWriteFloatArray#

Get the BPM offset values.

Returns:

RWBpmOffsetArray – BPM offset array for position correction

Raises:

PyAMLException – If offset has not been attached

property positions: ReadFloatArray#

Get the BPM position readings.

Returns:

RBpmArray – BPM position array containing horizontal and vertical positions

Raises:

PyAMLException – If positions have not been attached

property tilt: ReadWriteFloatScalar#

Get the BPM tilt angle.

Returns:

RWBpmTiltScalar – BPM tilt angle for rotation correction

Raises:

PyAMLException – If tilt has not been attached