pyaml.arrays.cfm_magnet_array#
Combined function magnet array module.
This module provides combined function magnet array functionality.
Classes
|
Class that implements access to a combined function magnet array |
|
Array accessor for the hardware values of combined-function magnets. |
|
Array accessor for the multipole strengths of combined-function magnets. |
- class pyaml.arrays.cfm_magnet_array.CombinedFunctionMagnetArray(arrayName, magnets, use_aggregator=False)#
Bases:
ElementArrayClass that implements access to a combined function magnet array
- Parameters:
arrayName (str) – Array name
magnets (list[CombinedFunctionMagnet]) – Magnet list, all elements must be attached to the same instance of either a Simulator or a ControlSystem.
use_aggregator (bool) – Use aggregator to increase performance by using parallel access to underlying devices.
Attributes
Give access to strength of each magnet of this array
Give access to hardware value of each magnet of this array
- property hardwares: RWMagnetHardwares#
Give access to hardware value of each magnet of this array
- property strengths: RWMagnetStrengths#
Give access to strength of each magnet of this array
- class pyaml.arrays.cfm_magnet_array.RWMagnetHardwares(name, magnets)#
Bases:
ReadWriteFloatArrayArray accessor for the hardware values of combined-function magnets.
- Parameters:
name (str) – Name of the array, used when the accessor is reported or logged.
magnets (list[CombinedFunctionMagnet]) – Combined-function magnets making up the array; each contributes one entry per multipole.
Methods
Return the hardware value of every multipole, concatenated over the magnets.
Set the hardware value of every multipole, concatenated over the magnets.
Set every hardware value and wait for the readbacks to converge.
Return the hardware unit of every multipole.
- get()#
Return the hardware value of every multipole, concatenated over the magnets.
- set(value)#
Set the hardware value of every multipole, concatenated over the magnets.
- Parameters:
value (np.array) – Hardware value of every multipole, concatenated magnet by magnet. A scalar is broadcast to all of them.
- set_and_wait(value)#
Set every hardware value and wait for the readbacks to converge.
- Parameters:
value (np.array) – Hardware value of every multipole, concatenated magnet by magnet. A scalar is broadcast to all of them.
- Raises:
NotImplementedError – Waiting for readback convergence is not implemented for this accessor.
- unit()#
Return the hardware unit of every multipole.
- class pyaml.arrays.cfm_magnet_array.RWMagnetStrengths(name, magnets)#
Bases:
ReadWriteFloatArrayArray accessor for the multipole strengths of combined-function magnets.
- Parameters:
name (str) – Name of the array, used when the accessor is reported or logged.
magnets (list[CombinedFunctionMagnet]) – Combined-function magnets making up the array; each contributes one entry per multipole.
Methods
Return the strength of every multipole, concatenated over the magnets.
Set the strength of every multipole, concatenated over the magnets.
Set every multipole strength and wait for the readbacks to converge.
Return the strength unit of every multipole.
- get()#
Return the strength of every multipole, concatenated over the magnets.
- set(value)#
Set the strength of every multipole, concatenated over the magnets.
- Parameters:
value (np.array) – Strength of every multipole, concatenated magnet by magnet. A scalar is broadcast to all of them.
- set_and_wait(value)#
Set every multipole strength and wait for the readbacks to converge.
- Parameters:
value (np.array) – Strength of every multipole, concatenated magnet by magnet. A scalar is broadcast to all of them.
- Raises:
NotImplementedError – Waiting for readback convergence is not implemented for this accessor.
- unit()#
Return the strength unit of every multipole.