cfm_magnet#

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

Bases: ElementConfigModel

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.

mapping: list[list[str]]#

Name mapping for multipoles (i.e. [[B0,C01A-H],[A0,C01A-H],[B2,C01A-S]])

model: MagnetModel | None#

Object in charge of converting magnet strenghts to currents

class CombinedFunctionMagnet(cfg, peer=None)[source]#

Bases: Element

CombinedFunctionMagnet class

attach(peer, strengths, hardwares)[source]#
get_model_name()[source]#

Returns the model name of this magnet

nb_multipole()[source]#
set_energy(E)[source]#

Set the instrument energy on this element

property hardwares: ReadWriteFloatScalar#

Gives access to the strengths of this combined function magnet in hardware unit when possible

property strengths: ReadWriteFloatScalar#

Gives access to the strengths of this combined function magnet in physics unit