pyaml.bpm.bpm#
Beam-position monitor elements and their runtime interfaces.
Classes
|
Beam position monitor (BPM) element. |
- class pyaml.bpm.bpm.BPM(name, lattice_names=None, description=None, x_pos=None, y_pos=None, x_offset=None, y_offset=None, tilt=None)#
Bases:
Element,DynamicValidationBeam position monitor (BPM) element.
Represents a BPM in the accelerator lattice and provides access to its associated readback signals, including horizontal and vertical beam positions, calibration offsets, and mechanical tilt.
- Parameters:
name (str) – Name of the BPM.
lattice_names (str | None, optional) – Lattice-specific name or names identifying the BPM.
description (str | None, optional) – Description of the BPM.
x_pos (str | None, optional) – Device catalog key for the horizontal beam position.
y_pos (str | None, optional) – Device catalog key for the vertical beam position.
x_offset (str | None, optional) – Device catalog key for the horizontal BPM offset.
y_offset (str | None, optional) – Device catalog key for the vertical BPM offset.
tilt (str | None, optional) – Device catalog key for the BPM tilt.
Attributes
Read accessor for the horizontal and vertical beam positions, in metres.
Read/write accessor for the two calibration offsets, in metres.
Read/write accessor for the mechanical tilt, in radians.
Methods
Attach BPM attributes to a peer.
Return configured device keys used for position readback.
Return the configured device key used for tilt access.
Return configured device keys used for offset control.
Configuration
- type: pyaml.bpm.bpm name: BPM_NAME lattice_names: LATTICE_BPM_NAME x_pos: DEVICE/X_POSITION y_pos: DEVICE/Y_POSITION x_offset: DEVICE/X_OFFSET y_offset: DEVICE/Y_OFFSET tilt: DEVICE/TILT
- attach(peer, positions, offset, tilt)#
Attach BPM attributes to a peer.
- Parameters:
peer (object) – Simulator or control-system peer.
positions (RBpmArray) – Read-only horizontal and vertical position interface.
offset (RWBpmOffsetArray) – Read/write horizontal and vertical offset interface.
tilt (RWBpmTiltScalar) – Read/write tilt interface.
- Returns:
Self – Shallow copy of this BPM bound to
peerand its interfaces.- Return type:
Self
- get_offset_devices()#
Return configured device keys used for offset control.
- Returns:
list of str or None – Horizontal and vertical offset device keys.
- Return type:
list[str | None]
- get_pos_devices()#
Return configured device keys used for position readback.
- Returns:
list of str or None – Horizontal and vertical position device keys.
- Return type:
list[str | None]
- get_tilt_device()#
Return the configured device key used for tilt access.
- Returns:
str or None – Tilt device key.
- Return type:
str | None
- property offset: ReadWriteFloatArray#
Get the BPM offset values.
- Returns:
ReadWriteFloatArray – Read/write array containing horizontal and vertical offsets.
- Raises:
PyAMLException – If offset has not been attached
- property positions: ReadFloatArray#
Get the BPM position readings.
- Returns:
ReadFloatArray – Read-only array containing horizontal and vertical positions.
- Raises:
PyAMLException – If positions have not been attached
- property tilt: ReadWriteFloatScalar#
Get the BPM tilt angle.
- Returns:
ReadWriteFloatScalar – Read/write BPM tilt angle used for rotation correction.
- Raises:
PyAMLException – If tilt has not been attached