Skip navigation links

Package xal.extension.twissobserver

The twissobserver package contains tools for computing the Courant-Snyder parameters σ at a hardware location along the beamline from the RMS beam sizes downstream of that that location.

See: Description

Package xal.extension.twissobserver Description

The twissobserver package contains tools for computing the Courant-Snyder parameters σ at a hardware location along the beamline from the RMS beam sizes downstream of that that location. Rather than running a model of the beamline and adjusting the initial conditions of the beam (i.e., the Courant-Snyder parameters) until a chi-squared fit of the model results to the data is achieved, the tools in this package create an automorphic map F from the Courant-Snyder parameter domain to itself. This is direct approach to the problem rather than the "weak" solution found by the fitting technique where the Courant-Snyder parameters minimizing a functional. Here the map is iterated to the fixed point of F, the fixed point σ = being the solution of Courant-Snyder parameters.

Let T : CSD be the map that takes Courant-Snyder parameters to the set of RMS beam sizes along the beamline. The map T is computed numerically by as a cascade of transfer maps along the beamline from the reconstruction location to each of the data locations. We assume there are at least as many data points as there are Courant-Snyder parameters so that |CS| ≤ |D|. Then the least-squares solution σ to the reconstruction problem is

    σ = (T*T)-1T*d ,

where T* is the adjoint of T and d is the vector of RMS beam sizes (i.e., the data). When no space charge is present T is a linear map and this equation may be solved directly.

When no space charge is present, indicated by I >> 0 where I is the generalized beam current, the map now depends upon the initial Courant-Snyder parameters, that is T = T(σ). For any given beam current I we define the map F : CSCS as

    F(σ,I) ≜ [T*(σ,I)T(σ,I)]-1T*(σ,I)d

The fixed point σ(I) of F is the set of Courant-Snyder parameters for the beam current I.

One particularly simply way of solving this problem is to pick an initial set of Courant-Snyder parameters σ0(I) and start iterating the above equation. If σ0(I) is within the region of contraction for the fixed point of F then the iteration converges to the solution. We can improve the convergence properties by forming an outside loop where I is increased from 0 to its target values. That is, F is iterated to its fixed point for each increment of beam current, and that fixed point is used to initialize the next iteration.

Another more sophisticated technique is a continuation method exploiting the smoothness of F(·, ·). Starting with F[σ(I), I] = σ(I) we take the total derivative with respect to I yielding

    ∂Iσ(I) = [Id - ∂σF(σ,I)]-1F(σ,I) ,

where Id is the identity map. Starting from σ0 the solution for I = 0, which can be computed exactly, we move along the curves

    σn+1σ(In + ΔI) = ∂IσnΔI + OI2) .

The derivatives are recomputed at each step and a brief fixed point iteration is executed to move σn back onto the solution curve σ(·) since the above linear extrapolation cannot account for curvature.

There are three classes which perform the Courant-Snyder parameter reconstructions from RMS beam size data using the techniques described above. The other classes in the package are support classes for those classes.

    CsZeroCurrentEstimator - This class is used for estimating the Courant-Snyder parameters whenever space charge effects are negligible. As described above, in this case it is a direct calculation and very fast. The class should always be used for such a case.

    CsFixedPointEstimator - This class estimates Courant-Snyder parameters using the fixed point iteration method, with space charge. At current this class performs very well; its convergence properties are good and it is fast.

    CsContinuationEstimator

If one has the RMS bunch lengths for the longitudinal direction then they can be used in the transverse Courant-Snyder calculations. However, as is usually the case, if these values are unknown then the class BunchLengthSimulator can be used to estimate them via simulation.

The measurement data is packaged in the class Measurement. Thus, the RMS sizes, the beamline locations from which they come, and the desired reconstruction location will fill out the attributes of this class. Class instances are then passed to the above reconstruction engines to compute the Courant-Snyder values.

Since:
Sep 24, 2014