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.XYStep
particle (Particle) – circulating particle. Default:
lattice.particle
if 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. ThePassMethod
used 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 | None) – Momentum deviation.
refpts (Type[Element] | Element | Callable[[Element], bool] | str | None | int | Sequence[int] | bool | Sequence[bool] | RefptsCode) – Observation points
dct (float | None) – Path lengthening.
df (float | None) – Deviation of RF frequency.
orbit (ndarray | None) – 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.find_m66()
usesfind_orbit6()
to search for the closed orbit in 6-D. In order for this to work the ring MUST have aCavity
element- 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.XYStep
DPStep (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