at.lattice.elements.abstract_elements#
Abstract Element
classes
Classes
Abstract Base class for all Element classes whose instances may modify the particle momentum |
|
Mixin class for default radiating elements ( |
|
Mixin class for elements representing collective effects |
- class Collective[source]#
Bases:
_DictLongtMotion
Mixin class for elements representing collective effects
Derived classes will automatically set the
is_collective
property when the element is active.The class must have a
default_pass
class attribute, a dictionary such that:default_pass[False]
is the PassMethod when collective effects are turned OFF,default_pass[True]
is the default PassMethod when collective effects are turned ON.
The
Collective
class must be set as the first base class.Example
>>> class WakeElement(Collective, Element): ... default_pass = {False: "IdentityPass", True: "WakeFieldPass"}
Defines a class where the
is_collective
property is handled
- class LongtMotion[source]#
Bases:
ABC
Abstract Base class for all Element classes whose instances may modify the particle momentum
Allows identifying elements potentially inducing longitudinal motion.
Subclasses of
LongtMotion
must provide two methods for enabling longitudinal motion:_get_longt_motion(self)
must return the activation state,set_longt_motion(self, enable, new_pass=None, copy=False, **kwargs)
must enable or disable longitudinal motion.
- class Radiative[source]#
Bases:
_Radiative
Mixin class for default radiating elements (
Dipole
,Quadrupole
,Wiggler
)Radiative
is a base class for the subset of radiative elements considered as the ones to be turned on by default:Dipole
,Quadrupole
andWiggler
, excluding the higher order multipoles.Radiative
inherits from_Radiative
and does not add any new functionality. Its purpose is to identify the default set of radiating elements.Example
>>> class Dipole(Radiative, Multipole):
Defines a class belonging to the default radiating elements. It converts the PassMethod according to the “*Pass” or “*RadPass” suffix.