FFAGSpirale

class zgoubidoo.commands.magnetique.FFAGSpirale(label1: str = '', label2: str = '', *params, **kwargs)[source]

Bases: zgoubidoo.commands.magnetique.PolarMultiMagnet

Spiral FFAG magnet, N-tuple.

Zgoubi manual description

FFAG-SPI works much like FFAG as to the field modelling, with essentially a different axial dependence. The FFAG-SPI procedure allows overlapping of fringe fields of neighboring dipoles, thus simulating in some sort the field in a dipole N-tuple (similar to Fig. 31, page 137). This allows for instance accounting for fringe field effects, or clamps, as schemed in Fig. 32.

The dimensioning of the magnet is defined by :

  • AT : total angular aperture

  • RM : mean radius used for the positioning of field boundaries

For each one of the N = 1 to (maximum) 5 dipoles of the N-tuple, the two effective field boundaries (entrance and exit EFBs) from which the dipole field is drawn are defined from geometric boundaries, the shape and position of which are determined by the following parameters:

  • \(ACN_i\) : arbitrary inner angle, used for EFBs positioning

  • ω : azimuth of an EFB with respect to ACN

  • ξ : spiral angle

with \(ACN_i\) and ω as defined in Fig. 32 (similar to what can be found in Figs. 31 and 11-A).

Calculation of the Field From a Single Dipole

The magnetic field is calculated in polar coordinates. At all (R, θ) in the median plane (Z = 0), the magnetic field due a single one (index i) of the dipoles of a N-tuple spiral FFAG magnet is written $$B_{Z_i}(R, θ) = B_{Z_{0,i}} F_i(R, θ) (R/RM )^{K_i}$$ wherein \(B_{Z_{0,i}}\) is a reference field, at reference radius \(RM_i\), whereas \(F(R,θ)\) is calculated as described below.

Calculation of \(F_i(R, θ)\)

The fringe field coefficient \(F_i(R, θ)\) associated with a dipole is computed as in the procedure DIPOLES (eq. 6.4.16), including radial dependence of the gap size : $$g(R) = g_0 (RM/R)^κ$$ so to simulate the effect of gap shaping on \(B_{Z_i}(R,θ)|_R\) field fall-off, over the all radial extent of the dipole (with normally - yet not necessarily in practice - κ ≈ Ki).

Calculation of the Full Field From All N Dipoles

For the rest, namely calculation of the full field at particle position, as resulting from the N dipoles, calculation of the mid-plane field derivatives, extrapolation off median plane, etc., things are performed in the same manner as for the DIPOLES procedure (see page 125).

Command attributes

LABEL1=''

Primary label for the Zgoubi command (default: auto-generated hash).

Type

str

LABEL2=''

Secondary label for the Zgoubi command.

Type

str

HEIGHT='20 centimeter'

Height of the magnet (distance between poles), used by plotting functions.

Type

Quantity

POLE_WIDTH='150 centimeter'

Pole width (used for plotting only).

Type

Quantity

PIPE_THICKNESS='2 centimeter'

Thickness of the pipe, used by plotting functions.

Type

Quantity

PIPE_COLOR='grey'

Color of the pipe, used by plotting functions.

Type

str

REFERENCE_FIELD_COMPONENT='BZ'

Orientation of the reference field (used by field maps)

Type

str

KINEMATICS='None'

A kinematics object.

Type

NoneType

APERTURE_LEFT='10 centimeter'

Aperture size of the magnet, left side (used for plotting only).

Type

Quantity

APERTURE_RIGHT='10 centimeter'

Aperture size of the magnet, right side (used for plotting only).

Type

Quantity

APERTURE_TOP='10 centimeter'

Aperture size of the magnet, top side (used for plotting only).

Type

Quantity

APERTURE_BOTTOM='10 centimeter'

Aperture size of the magnet, bottom side (used for plotting only).

Type

Quantity

IL='0'

Print field and coordinates along trajectories

Type

int

N='1'

Number of dipoles in the FFAG n-tuple (maximum 5)

Type

int

AT='0.0 degree'

Total angular extent of the N dipoles

Type

Quantity

RM='0.0 centimeter'

Reference radius: mean radius used for the positioning of field boundaries

Type

Quantity

ACN='[0.0 0.0 0.0 0.0 0.0] degree'

Azimuth for dipole positioning

Type

Quantity

DRM='[0.0 0.0 0.0 0.0 0.0] centimeter'

Reference radius offset of each dipole : RM_i = RM + DRM

Type

Quantity

BZ0='[0.0 0.0 0.0 0.0 0.0] kilogauss'

Field at the reference radius of each dipole

Type

Quantity

K='[0.0, 0.0, 0.0, 0.0, 0.0]'

Field index for each dipole

Type

list

G0_E='[1e-08 1e-08 1e-08 1e-08 1e-08] centimeter'

Reference gaps for the entrance fringe fields of each dipole.

Type

Quantity

K_E='[0, 0, 0, 0, 0]'

Fringe field parameter kappa

Type

list

NCE='[0, 0, 0, 0, 0]'

UNUSED

Type

list

C0_E='[0, 0, 0, 0, 0]'

Fringe field coefficient C0

Type

list

C1_E='[1, 1, 1, 1, 1]'

Fringe field coefficient C1

Type

list

C2_E='[0, 0, 0, 0, 0]'

Fringe field coefficient C2

Type

list

C3_E='[0, 0, 0, 0, 0]'

Fringe field coefficient C3

Type

list

C4_E='[0, 0, 0, 0, 0]'

Fringe field coefficient C4

Type

list

C5_E='[0, 0, 0, 0, 0]'

Fringe field coefficient C5

Type

list

SHIFT_E='[0.0 0.0 0.0 0.0 0.0] centimeter'

Shift of the EFB

Type

Quantity

OMEGA_E='[0.0 0.0 0.0 0.0 0.0] degree'

Azimuth of an EFB with respect to ACN

Type

Quantity

XI_E='[0.0 0.0 0.0 0.0 0.0] degree'

Spiral angle

Type

Quantity

G0_S='[1e-08 1e-08 1e-08 1e-08 1e-08] centimeter'

Reference gaps for the exit fringe fields of each dipole.

Type

Quantity

K_S='[0, 0, 0, 0, 0]'

Fringe field parameter kappa

Type

list

NCS='[0, 0, 0, 0, 0]'

UNUSED

Type

list

C0_S='[0, 0, 0, 0, 0]'

Fringe field coefficient C0

Type

list

C1_S='[1, 1, 1, 1, 1]'

Fringe field coefficient C1

Type

list

C2_S='[0, 0, 0, 0, 0]'

Fringe field coefficient C2

Type

list

C3_S='[0, 0, 0, 0, 0]'

Fringe field coefficient C3

Type

list

C4_S='[0, 0, 0, 0, 0]'

Fringe field coefficient C4

Type

list

C5_S='[0, 0, 0, 0, 0]'

Fringe field coefficient C5

Type

list

SHIFT_S='[0.0 0.0 0.0 0.0 0.0] centimeter'

Shift of the EFB

Type

Quantity

OMEGA_S='[0.0 0.0 0.0 0.0 0.0] degree'

Azimuth of an EFB with respect to ACN

Type

Quantity

XI_S='[0.0 0.0 0.0 0.0 0.0] degree'

Spiral angle

Type

Quantity

G0_L='[0.0 0.0 0.0 0.0 0.0] centimeter'

UNUSED Reference gaps for the lateral fringe fields of each dipole.

Type

Quantity

K_L='[-1, -1, -1, -1, -1]'

UNUSED Fringe field parameter kappa

Type

list

NCL='[0, 0, 0, 0, 0]'

UNUSED

Type

list

C0_L='[0, 0, 0, 0, 0]'

UNUSED Fringe field coefficient C0

Type

list

C1_L='[0, 0, 0, 0, 0]'

UNUSED Fringe field coefficient C1

Type

list

C2_L='[0, 0, 0, 0, 0]'

UNUSED Fringe field coefficient C2

Type

list

C3_L='[0, 0, 0, 0, 0]'

UNUSED Fringe field coefficient C3

Type

list

C4_L='[0, 0, 0, 0, 0]'

UNUSED Fringe field coefficient C4

Type

list

C5_L='[0, 0, 0, 0, 0]'

UNUSED Fringe field coefficient C5

Type

list

SHIFT_L='[0.0 0.0 0.0 0.0 0.0] centimeter'

UNUSED Shift of the EFB

Type

Quantity

OMEGA_L='[0.0 0.0 0.0 0.0 0.0] degree'

UNUSED

Type

Quantity

THETA_L='[0.0 0.0 0.0 0.0 0.0] degree'

UNUSED Entrance face wedge angle

Type

Quantity

R1_L='[1000000000.0 1000000000.0 1000000000.0 1000000000.0 1000000000.0] centimeter'

UNUSED Lateral EFB radius

Type

Quantity

U1_L='[1000000000.0 1000000000.0 1000000000.0 1000000000.0 1000000000.0] centimeter'

UNUSED Lateral EFB linear extent

Type

Quantity

U2_L='[1000000000.0 1000000000.0 1000000000.0 1000000000.0 1000000000.0] centimeter'

UNUSED Lateral EFB linear extent

Type

Quantity

R2_L='[1000000000.0 1000000000.0 1000000000.0 1000000000.0 1000000000.0] centimeter'

UNUSED Lateral EFB radius

Type

Quantity

KIRD='2'

Analytical computation (KIRD = 0) or numerical interpolation (KIRD = 2,4, 25) of field derivatives

Type

int

RESOL='2'
Type

int

XPAS='1.0 millimeter'

Integration step

Type

Quantity

RE='0.0 centimeter'
Type

Quantity

TE='0.0 radian'
Type

Quantity

RS='0.0 centimeter'
Type

Quantity

TS='0.0 radian'
Type

Quantity

Default initializer for all Commands.

Attributes Summary

KEYWORD

Keyword of the command used for the Zgoubi input data.

PARAMETERS

Parameters of the command, with their default value, their description and optinally an index used by other commands (e.g.

entry_wedge_angle

exit_wedge_angle

reference_angles

Returns:

Methods Summary

adjust_tracks_variables(tracks)

Attributes Documentation

KEYWORD: str = 'FFAG-SPI'

Keyword of the command used for the Zgoubi input data.

PARAMETERS: dict = {'ACN': (<Quantity([0. 0. 0. 0. 0.], 'degree')>, 'Azimuth for dipole positioning', 5), 'APERTURE_BOTTOM': (<Quantity(10, 'centimeter')>, 'Aperture size of the magnet, bottom side (used for plotting only).'), 'APERTURE_LEFT': (<Quantity(10, 'centimeter')>, 'Aperture size of the magnet, left side (used for plotting only).'), 'APERTURE_RIGHT': (<Quantity(10, 'centimeter')>, 'Aperture size of the magnet, right side (used for plotting only).'), 'APERTURE_TOP': (<Quantity(10, 'centimeter')>, 'Aperture size of the magnet, top side (used for plotting only).'), 'AT': (<Quantity(0.0, 'degree')>, 'Total angular extent of the N dipoles', 3), 'BZ0': (<Quantity([0. 0. 0. 0. 0.], 'kilogauss')>, 'Field at the reference radius of each dipole', 7), 'C0_E': ([0, 0, 0, 0, 0], 'Fringe field coefficient C0', 12), 'C0_L': ([0, 0, 0, 0, 0], 'UNUSED Fringe field coefficient C0', 44), 'C0_S': ([0, 0, 0, 0, 0], 'Fringe field coefficient C0', 28), 'C1_E': ([1, 1, 1, 1, 1], 'Fringe field coefficient C1', 13), 'C1_L': ([0, 0, 0, 0, 0], 'UNUSED Fringe field coefficient C1', 45), 'C1_S': ([1, 1, 1, 1, 1], 'Fringe field coefficient C1', 29), 'C2_E': ([0, 0, 0, 0, 0], 'Fringe field coefficient C2', 14), 'C2_L': ([0, 0, 0, 0, 0], 'UNUSED Fringe field coefficient C2', 46), 'C2_S': ([0, 0, 0, 0, 0], 'Fringe field coefficient C2', 30), 'C3_E': ([0, 0, 0, 0, 0], 'Fringe field coefficient C3', 15), 'C3_L': ([0, 0, 0, 0, 0], 'UNUSED Fringe field coefficient C3', 47), 'C3_S': ([0, 0, 0, 0, 0], 'Fringe field coefficient C3', 31), 'C4_E': ([0, 0, 0, 0, 0], 'Fringe field coefficient C4', 16), 'C4_L': ([0, 0, 0, 0, 0], 'UNUSED Fringe field coefficient C4', 48), 'C4_S': ([0, 0, 0, 0, 0], 'Fringe field coefficient C4', 32), 'C5_E': ([0, 0, 0, 0, 0], 'Fringe field coefficient C5', 17), 'C5_L': ([0, 0, 0, 0, 0], 'UNUSED Fringe field coefficient C5', 49), 'C5_S': ([0, 0, 0, 0, 0], 'Fringe field coefficient C5', 33), 'COLOR': ('blue',), 'DRM': (<Quantity([0. 0. 0. 0. 0.], 'centimeter')>, 'Reference radius offset of each dipole : RM_i = RM + DRM', 6), 'G0_E': (<Quantity([1.e-08 1.e-08 1.e-08 1.e-08 1.e-08], 'centimeter')>, 'Reference gaps for the entrance fringe fields of each dipole.', 9), 'G0_L': (<Quantity([0. 0. 0. 0. 0.], 'centimeter')>, 'UNUSED Reference gaps for the lateral fringe fields of each dipole.', 41), 'G0_S': (<Quantity([1.e-08 1.e-08 1.e-08 1.e-08 1.e-08], 'centimeter')>, 'Reference gaps for the exit fringe fields of each dipole.', 25), 'HEIGHT': (<Quantity(20, 'centimeter')>, 'Height of the magnet (distance between poles), used by plotting functions.'), 'IL': (0, 'Print field and coordinates along trajectories', 1), 'K': ([0.0, 0.0, 0.0, 0.0, 0.0], 'Field index for each dipole', 8), 'KINEMATICS': (None, 'A kinematics object.'), 'KIRD': (2, 'Analytical computation (KIRD = 0) or numerical interpolation (KIRD = 2,4, 25) of field derivatives', 57), 'K_E': ([0, 0, 0, 0, 0], 'Fringe field parameter kappa', 10), 'K_L': ([-1, -1, -1, -1, -1], 'UNUSED Fringe field parameter kappa', 42), 'K_S': ([0, 0, 0, 0, 0], 'Fringe field parameter kappa', 26), 'LABEL1': ('', 'Primary label for the Zgoubi command (default: auto-generated hash).'), 'LABEL2': ('', 'Secondary label for the Zgoubi command.'), 'N': (1, 'Number of dipoles in the FFAG n-tuple (maximum 5)', 2), 'NCE': ([0, 0, 0, 0, 0], 'UNUSED', 11), 'NCL': ([0, 0, 0, 0, 0], 'UNUSED', 43), 'NCS': ([0, 0, 0, 0, 0], 'UNUSED', 27), 'OMEGA_E': (<Quantity([0. 0. 0. 0. 0.], 'degree')>, 'Azimuth of an EFB with respect to ACN', 19), 'OMEGA_L': (<Quantity([0. 0. 0. 0. 0.], 'degree')>, 'UNUSED ', 51), 'OMEGA_S': (<Quantity([0. 0. 0. 0. 0.], 'degree')>, 'Azimuth of an EFB with respect to ACN', 35), 'PIPE_COLOR': ('grey', 'Color of the pipe, used by plotting functions.'), 'PIPE_THICKNESS': (<Quantity(2, 'centimeter')>, 'Thickness of the pipe, used by plotting functions.'), 'POLE_WIDTH': (<Quantity(150, 'centimeter')>, 'Pole width (used for plotting only).'), 'R1_L': (<Quantity([1.e+09 1.e+09 1.e+09 1.e+09 1.e+09], 'centimeter')>, 'UNUSED Lateral EFB radius', 53), 'R2_L': (<Quantity([1.e+09 1.e+09 1.e+09 1.e+09 1.e+09], 'centimeter')>, 'UNUSED Lateral EFB radius', 56), 'RE': (<Quantity(0.0, 'centimeter')>, '', 61), 'REFERENCE_FIELD_COMPONENT': ('BZ', 'Orientation of the reference field (used by field maps)'), 'RESOL': (2, '', 58), 'RM': (<Quantity(0.0, 'centimeter')>, 'Reference radius: mean radius used for the positioning of field boundaries', 4), 'RS': (<Quantity(0.0, 'centimeter')>, '', 63), 'SHIFT_E': (<Quantity([0. 0. 0. 0. 0.], 'centimeter')>, 'Shift of the EFB', 18), 'SHIFT_L': (<Quantity([0. 0. 0. 0. 0.], 'centimeter')>, 'UNUSED Shift of the EFB', 50), 'SHIFT_S': (<Quantity([0. 0. 0. 0. 0.], 'centimeter')>, 'Shift of the EFB', 34), 'TE': (<Quantity(0.0, 'radian')>, '', 62), 'THETA_L': (<Quantity([0. 0. 0. 0. 0.], 'degree')>, 'UNUSED Entrance face wedge angle', 52), 'TS': (<Quantity(0.0, 'radian')>, '', 64), 'U1_L': (<Quantity([1.e+09 1.e+09 1.e+09 1.e+09 1.e+09], 'centimeter')>, 'UNUSED Lateral EFB linear extent', 54), 'U2_L': (<Quantity([1.e+09 1.e+09 1.e+09 1.e+09 1.e+09], 'centimeter')>, 'UNUSED Lateral EFB linear extent', 55), 'XI_E': (<Quantity([0. 0. 0. 0. 0.], 'degree')>, 'Spiral angle', 20), 'XI_S': (<Quantity([0. 0. 0. 0. 0.], 'degree')>, 'Spiral angle', 36), 'XPAS': (<Quantity(1.0, 'millimeter')>, 'Integration step', 59)}

Parameters of the command, with their default value, their description and optinally an index used by other commands (e.g. fit).

entry_wedge_angle
exit_wedge_angle
reference_angles

Returns:

Methods Documentation

adjust_tracks_variables(tracks: pandas.core.frame.DataFrame)[source]