at.physics.matrix#
transfer matrix related functions
A collection of functions to compute 4x4 and 6x6 transfer matrices
Functions
|
One turn 4x4 transfer matrix |
|
One-turn 6x6 transfer matrix |
|
Single element 6x6 transfer matrix |
|
Converts a ring to a linear 6x6 matrix. |
- find_elem_m66(elem, orbit=None, **kwargs)[source]#
Single element 6x6 transfer matrix
Numerically finds the 6x6 transfer matrix of a single element
- Parameters:
- Keyword Arguments:
XYStep (float) – Step size. Default:
DConstant.XYStepparticle (Particle) – circulating particle. Default:
lattice.particleif existing, otherwiseParticle('relativistic')energy (float) – lattice energy. Default 0.
- Returns:
m66 – 6x6 transfer matrix
- find_m44(ring, dp=None, refpts=None, dct=None, df=None, orbit=None, keep_lattice=False, **kwargs)[source]#
One turn 4x4 transfer matrix
find_m44()finds the 4x4 transfer matrix of an accelerator lattice by differentiation of trajectories near the closed orbit.Important
find_m44()assumes constant momentum deviation. ThePassMethodused for any element SHOULD NOT:change the longitudinal momentum dP (cavities , magnets with radiation, …)
have any time dependence (localized impedance, fast kickers, …)
Unless an input orbit is introduced,
find_m44()assumes that the lattice is a ring and first finds the closed orbit.- Parameters:
ring (Lattice) – Lattice description (radiation must be OFF)
dp (float) – Momentum deviation.
refpts (Type[Element] | Element | Callable[[Element], bool] | str | None | int | Sequence[int] | bool | Sequence[bool] | RefptsCode) – Observation points
dct (float) – Path lengthening.
df (float) – Deviation of RF frequency.
orbit (ndarray) – Avoids looking for initial the closed orbit if it is already known ((6,) array).
keep_lattice (bool) – Assume no lattice change since the previous tracking. Default:
False
- Keyword Arguments:
full (bool) – If
True, matrices are full 1-turn matrices at the entrance of each element indexed by refpts. IfFalse(Default), matrices are between the entrance of the first element and the entrance of the selected elementXYStep (float) – Step size. Default:
DConstant.XYStep
- Returns:
m44 – full one-turn matrix at the entrance of the first element
ms – 4x4 transfer matrices between the entrance of the first element and each element indexed by refpts: (Nrefs, 4, 4) array
See also
- find_m66(ring, refpts=None, orbit=None, keep_lattice=False, **kwargs)[source]#
One-turn 6x6 transfer matrix
find_m66()finds the 6x6 transfer matrix of an accelerator lattice by differentiation of trajectories near the closed orbit.- Parameters:
ring (Lattice) – Lattice description
refpts (Type[Element] | Element | Callable[[Element], bool] | str | None | int | Sequence[int] | bool | Sequence[bool] | RefptsCode) – Observation points
orbit (ndarray) – Avoids looking for initial the closed orbit if it is already known ((6,) array).
keep_lattice (bool) – Assume no lattice change since the previous tracking. Default:
False
- Keyword Arguments:
XYStep (float) – Default:
DConstant.XYStepDPStep (float) – Momentum step size. Default:
DConstant.DPStep
- Returns:
m66 – full one-turn matrix at the entrance of the first element
ms – 6x6 transfer matrices between the entrance of the first element and each element indexed by refpts: (Nrefs, 6, 6) array
See also
- gen_m66_elem(ring, o6b=None, o6e=None, ringrad=None, o6brad=None, o6erad=None, **kwargs)[source]#
Converts a ring to a linear 6x6 matrix. This element handles 2 passmethods
Matrix66PassandMatrix66RadPass, that can be activated within a lattice usingenable_6()ordisable_6d(). This provides flexibility to turn ON and OFF the 6D motion or simply the radiation damping, depending on the configuration of the rings provided as input.- Parameters:
ring (Lattice) – Lattice description. Is used by
Matrix66Passringrad (Lattice) – Optional lattice with radiations. Is used by
Matrix66RadPasso6b (ndarray) – entrace orbit without radiations, use by
Matrix66Passo6e (ndarray) – exit orbit without radiations, use by
Matrix66Passo6b – entrace orbit with radiations, use by
Matrix66RadPasso6e – exit orbit with radiations, use by
Matrix66RadPass
- Returns:
m66 –
M66object