bpm#

class ConfigModel(*, name, description=None, lattice_names=None, model=None)[source]#

Bases: ElementConfigModel

Configuration model for BPM element.

model#

Object in charge of BPM modeling

Type:

BPMModel or None, optional

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.

model: BPMModel | 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

property model: BPMModel#

Get the BPM model.

Returns:

BPMModel – The BPM model instance

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