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:
_DictLongtMotionMixin class for elements representing collective effects
Derived classes will automatically set the
is_collectiveproperty when the element is active.The class must have a
default_passclass 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
Collectiveclass 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_collectiveproperty is handled
- class LongtMotion[source]#
Bases:
ABCAbstract Base class for all Element classes whose instances may modify the particle momentum
Allows identifying elements potentially inducing longitudinal motion.
Subclasses of
LongtMotionmust 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:
_RadiativeMixin class for default radiating elements (
Dipole,Quadrupole,Wiggler)Radiativeis a base class for the subset of radiative elements considered as the ones to be turned on by default:Dipole,QuadrupoleandWiggler, excluding the higher order multipoles.Radiativeinherits from_Radiativeand 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.