at.physics.rdt#
Resonance Driving Terms
Functions
|
Get the lattice Resonance Driving Terms |
Classes
|
Enum class for RDT type |
- class RDTType(*values)[source]#
Bases:
Enum
Enum class for RDT type
- ALL = 0#
all available RDTs
- CHROMATIC = 3#
Chromatic RDTs
- COUPLING = 2#
Linear coupling RDTs
- FOCUSING = 1#
Normal quadrupole RDTs
- GEOMETRIC1 = 4#
Geometric RDTs from sextupoles
- GEOMETRIC2 = 5#
Geometric RDTs from octupoles optionally includes the second order contribution of sextupoles
- TUNESHIFT = 6#
Amplitude detuning coefficients optionally includes the second order contribution of sextupoles
- get_rdts(ring, refpts, rdt_type, second_order=False, use_mp=False, pool_size=None)[source]#
Get the lattice Resonance Driving Terms
get_rdts()
computes the ring RDTs based on the original implementation from ELEGANT. For consistency, pyAT keeps the sign convention of the AT MATLAB interface.Refs [1] and [2] were used to calculate the magnitude of first and second order rdts and Ref. [3] for the focusing rdt, however, different sign conventions are used along the references and in the original implementation. To overcome this issue, first and second order rdts are provided as a total and also separately so the user can redefine these conventions if needed.
The resonance base of
GEOMETRIC2
rdts is explained in Eq. (54) of Ref [4].The periodicity property of the lattice is automatically taken into account in the rdt calculation, however the calculation of the second order contribution of sextupoles to the
GEOMETRIC2
andTUNESHIFT
RDT types can only be derived for periodicity=1 (i.e. full ring provided).- Parameters:
refpts (Type[Element] | Element | Callable[[Element], bool] | str | None | int | Sequence[int] | bool | Sequence[bool] | RefptsCode) – Element refpts at which the RDTs are calculated
rdt_type (Container[RDTType] | RDTType) –
Type of RDTs to be calculated. Possible RDT types are:
RDTType.ALL
: all available RDTsRDTType.FOCUSING
: Normal quadrupole RDTsRDTType.COUPLING
: Linear coupling RDTs from skew quadrupolesRDTType.CHROMATIC
: Chromatic RDTs from sextupoles and normal quadrupolesRDTType.GEOMETRIC1
: Geometric RDTs from sextupolesRDTType.GEOMETRIC2
: Geometric RDTs from octupoles. The second order contribution of sextupoles is added when second_order is TrueRDTType.TUNESHIFT
: Amplitude detuning coefficients. The second order contribution of sextupoles is added when second_order is True
- Keyword Arguments:
- Returns:
rdts (complex) – rdt data at refpts,
rdts2 (complex) – contribution from sextupole second order terms Available only for
GEOMETRIC2
andTUNESHIFT
terms,rdttot (complex) – total rdts.
rdts is a
record array
with fields:- for
FOCUSING
: h20000, h00200
- for
COUPLING
: h10010, h10100
- for
CHROMATIC
: h11001, h00111, h20001, h00201, h10002
- for
GEOMETRIC1
: h21000, h30000, h10110, h10020, h10200
- for
GEOMETRIC2
: h22000, h11110, h00220, h31000, h40000, h20110 h11200, h20020, h20200, h00310, h00400
- for
TUNESHIFT
: dnux_dJx, dnux_dJy, dnuy_dJy
Example
>>> get_rdts(ring, reftps, [RDTType.COUPLING, RDTType.CHROMATIC])
References