Subsections
The reader is invited to read chapter 3.2 for a better understanding on beam matrix and emittance. For convenience, we recall here some formulas:
 |
(9.4) |
 |
(9.5) |
 |
(9.6) |
 |
(9.7) |
 |
(9.8) |
Philippe Piot added to Astra the functionnality of outputing the
matrix if the option
SigmaS
is specified in the &NEWRUN
section of the run file. The structure of the output file is specified in table 9.1. The matrix being symmetric only 21(
) coefficients need to be stored. The two first columns contain the
position and the energy. The following 21 are the matrix coefficients.
A sigma matrix can be written in different units, and attention has been paid to plot the ellipse with the right dimension and units on each axis. To check this, we calculated directly the sigma matrix from the distribution, and we compared it with the matrix outputed by Astra. We did this for two cylinders with with two different normalized transversal emittances :
mrad.mm and
mrad.mm. See table 9.2 for more information on the distributions.
The 2D x-block of the matrix outputed by astra were:
and |
(9.9) |
One can easily notice that the square root of the determinant of these matrix provides the normalized emittance in [m.rad]. From the input distribution, the values

,

,

and

have been calculated, remembering our notation for the momentum variable in Astra:

. The units for these four values are respectively: [m], [eV/c], [.] and [rad]. From the comparison we concluded that the matrix outputed by astra was the following:
 |
(9.10) |
Nevertheless, the canonical variables in phase space are

instead of

, and the most commun set used is

. In the first case, one simply goes from dimensionless units [.] to [MeV/c] by using:
[MeV/c]![$\displaystyle = \left(\tilde{p}_x\:[.]\right) \times \left(m_0 c\: \text{[MeV/c]}\right)$](img552.gif) |
(9.11) |
where the product

[MeV/c]. And thus, the sigma matrix in the space

can be calculated, and has the following terms:
The correponding ellipse is plotted with horizontal and vertical units being respectively [m] and [MeV/c].
For the phase space

we use the relation:
 |
(9.14) |
where

stands for the mean value of

. Nevertheless, this value, close to

, is unknown in general with the single knowledge of the

matrix. We will then use another output file of Astra, the file:
run.ref.001, which contains the value of
![$ z [m]$](img562.gif)
, and
![$ \bar{p_z} [MeV/c]$](img563.gif)
. One has to be carefull because the number of lines of
run.ref.001 and
run.Sigma.001 are in general different, so the

column must be used to find the indices for which the

values of the two files are the closest. We will then write
![$\displaystyle \langle \tilde{p}_z \rangle \; [.] = \frac{ \langle p_z \rangle \; \text{[MeV/c]} }{0.511\; \text{[MeV/c]}}$](img564.gif) |
(9.15) |
So that eventually, the

matrix, in the phase space
The corresponding ellipse is plotted with horizontal and vertical units being respectively [m] and [rad].
To illustrate the difference between the ellipse representation and the real distribution in the phase space we chose first to use a uniform distribution of particules in the transversal direction. In this case, if
[mm], the radius of the bunch will be
. This is observed on figure 9.1 for the three sets of parameters
,
, and
. One can verify that the RMS values (i.e. the ellipse semi-axes)
,
correspond exactly to the values contained in the files run.Xemit.001 and run.Yemit.001, confirming that the algorithm plotting the ellipses from the covariance matrix it consistent.
Figure 9.1:
Phase space ellipse for a cylinder of emittance
mmrad.mm. for different set of parameters and units. (a)
- (b)
- (c)
. See table 9.2 for details on the cylindrical distribution used. The distribution along
is uniform, as well as the distribution of the momentum
, thus explaining this rectangular shape when plotted in the phase space. The ellipse plotted in the middle is the translation of the sigma matrix in terms of twiss-parameters, with the adapted units for each case. Figure (c) is in the canonical dimensions
, so that, when multiplying the axis lengths of the ellipse, one gets the normalised emittance : 5 mrad.mm
|
Figure 9.2:
Phase space ellipse for an ellipsoidal distribution with gaussian momentum. : (a) gaussian ellipsoid - (b) uniform ellipsoid.
 (a)
 (b)
|
The main part of this work was not the implementation itself, but the understanding of the units and dimensions as well as what should be plotted as an ellipse in the phase space. The previous section, might be a little hard to read, but it really translates the methodical approach used to be sure that we output and plot the right sigma matrix / ellipse. After modification of the fortran source file
X_em_mon.f, Astra is now outputing a file
run.Sigmas.001 which has the following structure (table
9.3).