Documentation: BXY files

BXY is a file format to define the beta values, eta and eta prime (dispersion) values, and the alpha functions along the trajectory.

Warning: BXY file format changed with version 1.4.13 (alpha functions added, energy spread removed)

These parameters are used as the following definitions to calculate emittances, beam size and divergence:

Image

Where dE/E is the energy spread and coupling is the vertical/horizontal beam coupling.

A BXY file has the following structure:

coordinate_type
Coordinate1 BetaX_value1 BetaY_value1 [Eta_x_value1 Eta_x_Prime_Value1] [Alpha_x_value1 Alpha_y_value1]
Coordinate2 BetaX_value2 BetaY_value2 [Eta_x_value2 Eta_x_Prime_Value2] [Alpha_x_value2 Alpha_y_value2]
...
CoordinateN BetaX_valueN BetaY_valueN [Eta_x_valueN Eta_x_Prime_ValueN] [Alpha_x_valueN Alpha_y_valueN]

With the following meanings - pay attention to the units:

coordinate_kind - "X", "Y" or "Z". Defines which absolute coordinate the first values in the subsequent lines mean.

coordinateN = the absolute X, Y or Z lookup coordinate in [cm] - subsequent values in the line belong to that coordinate. The coordinates need to be in an increasing order.

BetaX_value - the beam BetaX value at the given coordinate [cm]

BetaY_value - the beam BetaY value at the given coordinate [cm]

Eta_x_value - the Horizontal dispersion (EtaX) value at the given coordinate [cm]

Eta_x_Prime_value - the horizontal angular dispersion (EtaX Prime) value at the given coordinate [radians, i.e. no dimension]

Eta_x and Eta_x_prime are optional. If you don't specify them, then they will each be considered 0. If you specify Eta_x, then Synrad also expects Eta_x_prime (either 3 or 5 values in a line)

Alpha_x_value - the derivative of Beta_X, multiplied by -1/2. Used to determine if a beam is converging or diverging at a point. Since it's a derivative (Beta_X derived by the trajectory coordinate), it has [no dimension]

Alpha_y_value - the derivative of Beta_Y, multiplied by -1/2. Used to determine if a beam is converging or diverging at a point. Since it's a derivative (Beta_Y derived by the trajectory coordinate), it has [no dimension]

Alpha_x and Alpha_y are optional, they are considered as 0 if not specified. If Alpha_X is specified, Synrad also expects Alpha_Y (either 5 or 7 values in a line.
Since these are derivatives, the values are the same when the Beta functions are in meters or in centimeters - no conversion is needed from a MADX survey, for example.
 
Values between the given coordinates are linearly interpolated. Coordinates have to be monotonously increasing.
 

Examples

​2 Z
0 100 200 20000 200 10 -5
100 200 100 20000 200 0 5

This file means that the BetaX and BetaY functions change linearly between 100cm and 200cm, EtaX and EtaXPrime values are constantly 20000cm and 200 (radians), and the AlphaX and AlphaY values linearly change between 10 and 0 between Z=0 and Z=100cm.