at.physics.rdt#
Functions
|
|
Classes
|
Enum class for RDT type RDTType.ALL: all available RDTs RDTType.FOCUSING: Normal quadrupole RDTs RDTType.COUPLING: Linear coupling RDTs RDTType.CHROMATIC: Chromatic RDTs RDTType.GEOMETRIC1: Geometric RDTs from sextupoles RDTType.GEOMETRIC2: Geometric RDTs from octupoles optionally includes the second order contribution of sextupoles RDTType.TUNESHIFT: Amplitude detuning coefficients optionally includes the second order contribution of sextupoles |
- class RDTType(*values)[source]#
Bases:
Enum
Enum class for RDT type RDTType.ALL: all available RDTs RDTType.FOCUSING: Normal quadrupole RDTs RDTType.COUPLING: Linear coupling RDTs RDTType.CHROMATIC: Chromatic RDTs RDTType.GEOMETRIC1: Geometric RDTs from sextupoles RDTType.GEOMETRIC2: Geometric RDTs from octupoles optionally includes the second order contribution of sextupoles RDTType.TUNESHIFT: Amplitude detuning coefficients optionally includes the second order contribution of sextupoles
- ALL = 0#
- CHROMATIC = 3#
- COUPLING = 2#
- FOCUSING = 1#
- GEOMETRIC1 = 4#
- GEOMETRIC2 = 5#
- TUNESHIFT = 6#
- get_rdts(ring, refpts, rdt_type, second_order=False, use_mp=False, pool_size=None)[source]#
get_rdts()
computes the ring RDTs based on the original implementation from ELEGANT. For consistency, pyAT keeps the sign convention of the AT MATLAB interfaceRefs [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 and DETUNING RDT types can only be derived for periodicity=1 (i.e. full ring provided)
- Usage:
>>> get_rdts(ring, reftps, [RDTType.COUPLING, RDTType.CHROMATIC])
- Parameters:
ring (Lattice) –
at.Lattice
objectrefpts (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 (Sequence[RDTType] | RDTType) – Type of RDTs to be calculated. The type can be
:param
Sequence[at.RDTType] | at.RDTType
.: :param Possible RDT types are: at.RDTType.ALL: all available RDTsat.RDTType.FOCUSING: Normal quadrupole RDTs at.RDTType.COUPLING: Linear coupling RDTs from skew quadrupoles at.RDTType.CHROMATIC: Chromatic RDTs from sextupoles and normal quadrupoles at.RDTType.GEOMETRIC1: Geometric RDTs from sextupoles at.RDTType.GEOMETRIC2: Geometric RDTs from octupoles
the second order contribution of sextupoles is added when
second_order = True
- at.RDTType.TUNESHIFT: Amplitude detuning coefficients
the second order contribution of sextupoles is added when
second_order = True
- Keyword Arguments:
second_order – Compute second order terms (default: False). Computation is significantly longer using this method
use_mp – Activate parallel calculation
pool_size – Number of processes used for parallelization
- Returns:
rdts – rdt data (complex) at refpts
rdts2 – (complex) contribution from sextupole second order terms Available only for GEOMETRIC2 terms
rdttot – (complex) total rdts
**rdts is a dictionary with keys**
================= ======
**refpts location of the rdt**
**h20000 at.RDTType.FOCUSING**
**h00200**
**h10010 at.RDTType.COUPLING**
**h10100**
**h11001 at.RDTType.CHROMATIC**
**h00111**
**h20001**
**h00201**
**h10002**
**h21000 at.RDTType.GEOMETRIC1**
**h30000**
**h10110**
**h10020**
**h10200**
**h22000 at.RDTType.GEOMETRIC2**
**h11110**
**h00220**
**h31000**
**h40000**
**h20110**
**h11200**
**h20020**
**h20200**
**h00310**
**h00400**
**dnux_dJx at.RDTType.DETUNING**
**dnux_dJy**
**dnuy_dJy**
================= ======
References
[1] J.Bengtsson, SLS Note 9 / 97, March 7, 1997, with corrections per W.Guo (NSLS) [2] Revised to follow C.X.Wang AOP - TN - 2009 - 020 for second - order terms [3] A. Franchi et al. arxiv 1711.06589, PRAB 17.074001 [4] Chunxi Wang and Alex Chao. Notes on Lie algebraic analysis of achromats. SLAC/AP-100. Jan/1995