at.physics.amat#
A-matrix construction
Functions
|
Find the \(\mathbf{A}\) matrix from one turn map \(\mathbf{M}\) |
|
Find the A matrix from one turn map matrix T |
|
antisymetric block diagonal matrix [[0, 1][-1, 0]] |
|
Modified antisymetric block diagonal matrix to deal with the swap of the longitudinal coordinates |
|
Computes the mode emittances, tunes and damping times |
Derives the R-matrices from the A-matrix |
|
|
Makes A matrix more symplectic |
- a_matrix(M)[source]#
Find the \(\mathbf{A}\) matrix from one turn map \(\mathbf{M}\)
\(\mathbf{A}\) represents a change of referential which converts the one-turn transfer matrix \(\mathbf{M}\) into a set of rotations:
\[\mathbf{M} = \mathbf{A} \cdot \mathbf{R} \cdot \mathbf{A}^{-1}\]with \(\mathbf{R}\) A block-diagonal matrix:
\[\begin{split}\mathbf{R}=\begin{pmatrix}rot_1 & 0 & 0 \\ 0 & rot_2 & 0 \\ 0 & 0 & rot_3\end{pmatrix} \text{, and } rot_i = \begin{pmatrix}\cos{\mu_i} & \sin{\mu_i} \\ -\sin{\mu_i} & cos{\mu_i}\end{pmatrix}\end{split}\]With radiation damping, the diagonal blocks are instead damped rotations:
\[\begin{split}rot_i = \begin{pmatrix}\exp{(-\alpha_i}) & 0 \\ 0 & \exp{(-\alpha_i)} \end{pmatrix} \cdot \begin{pmatrix}\cos{\mu_i} & \sin{\mu_i} \\ -\sin{\mu_i} & cos{\mu_i}\end{pmatrix}\end{split}\]The order of diagonal blocks it set so that it is close to the order of x,y,z.
- Parameters:
M – (m, m) transfer matrix for 1 turn
m, the dimension of \(\mathbf{M}\), may be 2 (single plane), 4 (betatron motion) or 6 (full motion)
- Returns:
A – (m, m) A-matrix
eigval – (m/2,) Vector of Eigen values of T
References
[1] Etienne Forest, Phys. Rev. E 58, 2481 – Published 1 August 1998
- amat(M)[source]#
Find the A matrix from one turn map matrix T
Provided for backward compatibility, see
a_matrix()
- Parameters:
M – (m, m) transfer matrix for 1 turn
- Returns:
A – (m, m) A-matrix
- get_mode_matrices(A)[source]#
Derives the R-matrices from the A-matrix
- Parameters:
A – A-matrix
- Returns:
R
References
[1] Andrzej Wolski, Phys. Rev. ST Accel. Beams 9, 024001 – Published 3 February 2006
- get_tunes_damp(M, R=None)[source]#
Computes the mode emittances, tunes and damping times
- Parameters:
M – (m, m) transfer matrix for 1 turn
R – (m, m) beam matrix (optional), allows computing the mode emittances
m, the dimension of \(\mathbf{M}\), may be 2 (single plane), 4 (betatron motion) or 6 (full motion)
- Returns:
V – record array with the following fields:
tunes (m/2,) tunes of the m/2 normal modes
damping_rates (m/2,) damping rates of the m/2 normal modes
mode_matrices (m/2, m, m) the R-matrices of the m/2 normal modes
mode_emittances Only if R is specified: (m/2,) emittance of each of the m/2 normal modes
- jmat(ind)[source]#
antisymetric block diagonal matrix [[0, 1][-1, 0]]
- Parameters:
ind (int) – Matrix dimension: 1, 2 or 3
- Returns:
S – Block diagonal matrix, (2, 2) or (4, 4) or (6, 6)
- jmatswap(ind)[source]#
Modified antisymetric block diagonal matrix to deal with the swap of the longitudinal coordinates
- symplectify(M)[source]#
Makes A matrix more symplectic
following the Healy algorithm described by MacKay
- Parameters:
M – Almost symplectic matrix
- Returns:
MS – Symplectic matrix
References
[1] W.W.MacKay, Comment on Healy’s symplectification algorithm, Proceedings of EPAC 2006