next up previous contents index
Next: Listing Element Attributes Up: Tables Previous: Closed Orbit Correction   Contents   Index


Lattice Function Tables

Two commands are available to generate tables of lattice functions:


TWISS,LINE=name,BEAM=name,RANGE=range,STATIC=logical,METHOD= name,
      REVBEAM=logical,REVTRACK=logical;
TWISSTRACK,BEAM=name,RANGE=range,STATIC=logical,METHOD= name,
      INIT=table-row,REVBEAM=logical,REVTRACK=logical;

Either command builds a ``twiss'' table containing the lattice functions for a range of a previously defined beam line. The first command, TWISS, uses the periodic solution for that range, while the second command, TWISSTRACK a selected line of another twiss table. The table can be referred to by its label for later manipulation. Both commands have the following read/write attributes:

LINE
The label of a previously defined beam line (no default).
BEAM
The label of a previously defined beam (default UNNAMED_BEAM). This is used to define the type and reference momentum for the particles to be sent through the line.
RANGE
If this attribute is given, the table is restricted to the range given.
STATIC
If this attribute is true, the table is filled at definition time, and it is then treated as frozen, even if parameters of the machine change.
METHOD
This attribute specifies the method to be used for filling the table. Known names are:
THIN
Use thin lens approximations.
LINEAR
Use linear map approximation (around the closed orbit). This is the default.
THICK
Use finite-length lenses.
REVBEAM
If true, the beam is assumed to run backwards through the beam line (from $s=C$ to $s=0$).
REVTRACK
If true, the calculation proceeds in the direction opposite to the beam direction. This attribute may be used in matching, when tracking lattice functions from a known position back to a position to be used to adjust an insertion.
The TWISS command has the following read-only attributes:
L
The total arc length [m].
FREQ0
The computed revolution frequency in MHz.
QX
The computed tune for mode 1.
QY
The computed tune for mode 2.
QS
The computed tune for mode 3.
U0
The computed energy loss per turn [MeV].
JX
The computed damping partition number for mode 1.
JY
The computed damping partition number for mode 2.
JE
The computed damping partition number for mode 3.
The values related to damping exist only when the flag DAMP has been set.

The TWISSTRACK can be initialised by the following attribute:

INIT
If this attribute is given, the initial position and direction is taken from the specified row of another TWISS table.

Example:


LATFUN:TWISS,LINE=CELL;
This example computes the lattice functions for CELL with zero initial conditions and saves the result under the name LATFUN.

A table generated by TWISS (not TWISSTRACK) also has some read-only attributes:

Table 7.3: Global read-only values in a TWISS table
Variable Unit Name
Revolution frequency Hz FREQ
Tune for mode 1 1 QX
Tune for mode 2 1 QY
Tune for mode 3 1 QS
Energy loss per turn MeV U0
Damping partition number for mode 1 1 JX
Damping partition number for mode 2 1 JY
Damping partition number for mode 3 1 JE

In each the TWISS table stores the closed orbit and the transfer map from the beginning to this position. Several column values, as well as the eigenvectors, second moments, and transfer matrices can be derived from this information These quantities are accessible with the syntax


table-name "@" place "->" column-name


Table 7.4: Column values in a TWISS table
Variable Unit Name
Arc length from beginning m S
Horizontal position for closed orbit m XC
Horizontal momentum for closed orbit 1 PXC
Vertical position for closed orbit m YC
Vertical momentum for closed orbit 1 PYC
Longitudinal position for closed orbit m TC
Longitudinal momentum for closed orbit 1 PTC
Dispersion for horizontal position m DX
Dispersion for horizontal momentum 1 DPX
Dispersion for vertical position m DY
Dispersion for vertical momentum 1 DPY
Dispersion for longitudinal position m DT
Dispersion for longitudinal momentum 1 DPT

    Plane
Courant-Snyder Functions Unit X Y T
Beta-function m BETX BETY BETT
Alpha-function 1 ALFX ALFY ALFT
Phase 1 MUX MUY MUT


Table 7.5: Some of the column values in a TWISS3 table
      Plane
Mais-Ripken Functions Unit Mode X Y T
    1 BETX1 BETY1 BETT1
Beta-function m 2 BETX2 BETY2 BETT2
    3 BETX3 BETY3 BETT3
    1 ALFX1 ALFY1 ALFT1
Alpha-function 1 2 ALFX2 ALFY2 ALFT2
    3 ALFX3 ALFY3 ALFT3
    1 GAMX1 GAMY1 GAMT1
Gamma-function 1/m 2 GAMX2 GAMY2 GAMT2
    3 GAMX3 GAMY3 GAMT3

The Courant-Snyder lattice functions are calculated in a way analogous to the lattice functions given by Edwards and Teng. After partitioning the eigenvector matrix into two by two blocks it can be factored as

\begin{displaymath}
E = \left(
\begin{array}{lll}
E_{11} & E_{12} & E_{13} \\ ...
...W_1 & 0 & 0 \\ 0 & W_2 & 0 \\ 0 & 0 & W_3
\end{array}\right),
\end{displaymath}

where the $r_i$ are scalars and $R$ and $W$ are symplectic matrices. This implies

\begin{displaymath}
r_i = \sqrt{\vert R_{ii}\vert}, \qquad
W_i = R_{ii} / r_i \rightarrow \vert W_i\vert = 1, \qquad
R_{ik} = E_{ik} W_i^{-1}.
\end{displaymath}

The lattice functions are calculated from the diagonal blocks $W_i$. Note that the matrix $R$ which defines the coupling between planes is not available for output, and that the formalism breaks down when $r_i=0$. The default column set contains the element name, the arc length, the beta, alpha and mu functions for the transverse planes, the closed orbit position, and the horizontal dispersion.

The Mais-Ripken functions have been introduced by Mais and Ripken.

The second moments (beam envelope) are defined in the sense of TRANSPORT:

\begin{displaymath}
\Sigma_{ik} = E_x ( E_{i1} E_{k1} + E_{i2} E_{k2}) +
E_y (...
...{k3} + E_{i4} E_{k4}) +
E_t ( E_{i5} E_{k5} + E_{i6} E_{k6}).
\end{displaymath}


Table 7.6: Eigenvector components in a EIGEN table
Eigenvector   Mode 1 Mode 2 Mode 3
Component Unit real imag real imag real imag
X-component m E11 E12 E13 E14 E15 E16
PX-component 1 E21 E22 E23 E24 E25 E26
Y-component m E31 E32 E33 E34 E35 E36
PY-component 1 E41 E42 E43 E44 E45 E46
T-component m E51 E52 E53 E54 E55 E56
PT-component 1 E61 E62 E63 E64 E65 E66


Table 7.7: Second moments <X1,X2> in a ENVELOPE table
Second moment Second variable X2
First variable X1 X PX Y PY T PT
X S11 S12 S13 S14 S15 S16
PX S21 S22 S23 S24 S25 S26
Y S31 S32 S33 S34 S35 S36
PY S41 S42 S43 S44 S45 S46
T S51 S52 S53 S54 S55 S56
PT S61 S62 S63 S64 S65 S66


Table 7.8: Transfer matrix elements (X2,X1) in a MATRIX table
Matrix Element Second variable X2
First variable X1 X PX Y PY T PT
X R11 R12 R13 R14 R15 R16
PX R21 R22 R23 R24 R25 R26
Y R31 R32 R33 R34 R35 R36
PY R41 R42 R43 R44 R45 R46
T R51 R52 R53 R54 R55 R56
PT R61 R62 R63 R64 R65 R66


next up previous contents index
Next: Listing Element Attributes Up: Tables Previous: Closed Orbit Correction   Contents   Index
MAD User Guide, http://wwwslap.cern.ch/mad/