model#
- class MagnetModel[source]#
Bases:
objectAbstract class providing strength to coil current conversion and access to underlying power supplies
- abstractmethod compute_hardware_values(strengths)[source]#
Compute hardware value(s) from magnet strength(s)
- Parameters:
strengths (npt.NDArray[np.float64]) – Array of strengths. For a single multipole, strengths is an array of 1 item.
- Returns:
npt.NDArray[np.float64] – Array of hardware values (i.e. currents or voltages).
- abstractmethod compute_strengths(hardware_values)[source]#
Compute magnet strength(s) from hardware value(s)
- Parameters:
hardware_values (npt.NDArray[np.float64]) – Array of hardware values (i.e. currents or voltages)
- Returns:
npt.NDArray[np.float64] – Array of strengths. For a single multipole, returns an array of 1 item
- abstractmethod get_devices()[source]#
Get device handles
- Returns:
list[DeviceAccess] – Array of DeviceAcess
- abstractmethod get_hardware_units()[source]#
Get hardware units
- Returns:
list[str] – Array of hardware units. For a single multipole, returns a list of 1 item
- abstractmethod get_strength_units()[source]#
Get strength units
- Returns:
list[str] – Array of strength units. For a single multipole, returns a list of 1 item
- has_hardware()[source]#
Tells if the model allows to work in hardware unit.
- Returns:
bool – True if the model supports hardware unit