Multipole

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

Bases: zgoubidoo.commands.magnetique.CartesianMagnet

Magnetic multipole.

Zgoubi manual description

The simulation of multipolar magnetic field M⃗ by MULTIPOL proceeds by addition of the dipolar (B1), quadrupolar (B2), sextupolar (B3), etc., up to 20-polar (B10) components, and of their derivatives up to fourth order.

The independent components B1, B2, B3, …, B10 and their derivatives up to the fourth order are calculated as described in section 1.3.7.

The entrance and exit fringe fields are treated separately. They are characterized by the integration zone XE at entrance and XS at exit, as for QUADRUPO, and by the extent λE at entrance, λS at exit. The fringe field extents for the dipole component are λE and λS. The fringe field for the quadrupolar (sextupolar, …, 20-polar) component is given by a coefficient E2 (E3, …, E10) at entrance, and S2 (S3, …, S10) at exit, such that the extent is λE * E2 (λE * E3, …, λE * E10) at entrance and λS * S2 (λS * S3, …, λS * S10) at exit.

If λE = 0 (λS = 0) the multipole lens is considered to have a sharp edge field at entrance (exit), and then, XE (XS) is forced to zero (for the mere purpose of saving computing time). If Ei = 0 (Si = 0) (i = 2, 10), the entrance (exit) fringe field for the multipole component i is considered as a sharp edge field. In sharp edge field model, the wedge angle vertical first order focusing effect (if B1 is non zero) is simulated at magnet entrance and exit by a kick P2 = P1 − Z1 tan(ε/ρ) applied to each particle (P1, P2 are the vertical angles upstream and downstream of the EFB, Z1 is the vertical particle position at the EFB, ρ the local horizontal bending radius and ε the wedge angle experienced by the particle ; ε depends on the horizontal angle T).

Any multipole component Bi can be rotated independently by an angle RXi around the longitudinal X- axis, for the simulation of positioning defects, as well as skew lenses.

Magnet (mis-)alignment is assured by KPOS. KPOS also allows some degrees of automatic alignment useful for periodic structures (section 4.6.7).

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='30 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

COLOR='green'

Magnet color for plotting.

Type

str

LENGTH_IS_ARC_LENGTH='False'
Type

bool

IL='0'

Print field and coordinates along trajectories

Type

int

XL='0 centimeter'

Magnet length

Type

Quantity

R0='10.0 centimeter'

Radius of the pole tips

Type

Quantity

B1='0 kilogauss'

Field at pole tip for dipolar component.

Type

Quantity

B2='0 kilogauss'

Field at pole tip for quadrupolar component.

Type

Quantity

B3='0 kilogauss'

Field at pole tip for sextupolar component.

Type

Quantity

B4='0 kilogauss'

Field at pole tip for octupolar component.

Type

Quantity

B5='0 kilogauss'

Field at pole tip for decapolar component.

Type

Quantity

B6='0 kilogauss'

Field at pole tip for dodecapolar component.

Type

Quantity

B7='0 kilogauss'

Field at pole tip for 14-polar component.

Type

Quantity

B8='0 kilogauss'

Field at pole tip for 16-polar component.

Type

Quantity

B9='0 kilogauss'

Field at pole tip for 18-polar component.

Type

Quantity

B10='0 kilogauss'

Field at pole tip for 20-polar component.

Type

Quantity

X_E='0 centimeter'

Entrance face integration zone for the fringe field.

Type

Quantity

LAM_E='0 centimeter'

Entrance face fringe field extent

Type

Quantity

E2='1'

Quadrupole entrance fringe field extent (E_2 * LAM_E).

Type

int

E3='1'

Sextupolar entrance fringe field extent (E_3 * LAM_E).

Type

int

E4='1'

Octupolar entrance fringe field extent (E_4 * LAM_E).

Type

int

E5='1'

Decapolar entrance fringe field extent (E_5 * LAM_E).

Type

int

E6='1'

Dodecapolar entrance fringe field extent (E_6 * LAM_E).

Type

int

E7='1'

14-polar entrance fringe field extent (E_7 * LAM_E).

Type

int

E8='1'

16-polar entrance fringe field extent (E_8 * LAM_E).

Type

int

E9='1'

18-polar entrance fringe field extent (E_9 * LAM_E).

Type

int

E10='1'

20-polar entrance fringe field extent (E_10 * LAM_E).

Type

int

C0_E='0'

Zeroth-order Enge coefficient for entrance fringe field.

Type

int

C1_E='1'

First-order Enge coefficient for entrance fringe field.

Type

int

C2_E='0'

Second-order Enge coefficient for entrance fringe field.

Type

int

C3_E='0'

Third-order Enge coefficient for entrance fringe field.

Type

int

C4_E='0'

Fourth-order Enge coefficient for entrance fringe field.

Type

int

C5_E='0'

Fifth-order Enge coefficient for entrance fringe field.

Type

int

X_S='0 centimeter'

Exit face integration zone for the fringe field.

Type

Quantity

LAM_S='0 centimeter'

Exit face fringe field extent

Type

Quantity

S2='1'

Quadrupole exit fringe field extent (E_2 * LAM_S).

Type

int

S3='1'

Sextupolar exit fringe field extent (E_3 * LAM_S).

Type

int

S4='1'

Octupolar exit fringe field extent (E_4 * LAM_S).

Type

int

S5='1'

Decapolar exit fringe field extent (E_5 * LAM_S).

Type

int

S6='1'

Dodecapolar exit fringe field extent (E_6 * LAM_S).

Type

int

S7='1'

14-polar exit fringe field extent (E_7 * LAM_S).

Type

int

S8='1'

16-polar exit fringe field extent (E_8 * LAM_S).

Type

int

S9='1'

18-polar exit fringe field extent (E_9 * LAM_S).

Type

int

S10='1'

20-polar exit fringe field extent (E_10 * LAM_S).

Type

int

C0_S='0'

Zeroth-order Enge coefficient for entrance fringe field.

Type

int

C1_S='1'

First-order Enge coefficient for exit fringe field.

Type

int

C2_S='0'

Second-order Enge coefficient for exit fringe field.

Type

int

C3_S='0'

Third-order Enge coefficient for exit fringe field.

Type

int

C4_S='0'

Fourth-order Enge coefficient for exit fringe field.

Type

int

C5_S='0'

Fifth-order Enge coefficient for exit fringe field.

Type

int

R1='0 degree'

Skew angle of the dipolar component

Type

Quantity

R2='0 degree'

Skew angle of the quadrupolar component

Type

Quantity

R3='0 degree'

Skew angle of the sextupolar component

Type

Quantity

R4='0 degree'

Skew angle of the octupolar component

Type

Quantity

R5='0 degree'

Skew angle of the decapolar component

Type

Quantity

R6='0 degree'

Skew angle of the dodecapolar component

Type

Quantity

R7='0 degree'

Skew angle of the 14-polar component

Type

Quantity

R8='0 degree'

Skew angle of the 16-polar component

Type

Quantity

R9='0 degree'

Skew angle of the 18-polar component

Type

Quantity

R10='0 degree'

Skew angle of the 20-polar component

Type

Quantity

XPAS='1.0 centimeter'

Integration step.

Type

Quantity

KPOS='1'
Type

int

XCE='0 centimeter'
Type

Quantity

YCE='0 centimeter'
Type

Quantity

ALE='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.

Attributes Documentation

KEYWORD: str = 'MULTIPOL'

Keyword of the command used for the Zgoubi input data.

PARAMETERS: dict = {'ALE': (<Quantity(0, 'radian')>, ''), '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).'), 'B1': (<Quantity(0, 'kilogauss')>, 'Field at pole tip for dipolar component.', 4), 'B10': (<Quantity(0, 'kilogauss')>, 'Field at pole tip for 20-polar component.', 13), 'B2': (<Quantity(0, 'kilogauss')>, 'Field at pole tip for quadrupolar component.', 5), 'B3': (<Quantity(0, 'kilogauss')>, 'Field at pole tip for sextupolar component.', 6), 'B4': (<Quantity(0, 'kilogauss')>, 'Field at pole tip for octupolar component.', 7), 'B5': (<Quantity(0, 'kilogauss')>, 'Field at pole tip for decapolar component.', 8), 'B6': (<Quantity(0, 'kilogauss')>, 'Field at pole tip for dodecapolar component.', 9), 'B7': (<Quantity(0, 'kilogauss')>, 'Field at pole tip for 14-polar component.', 10), 'B8': (<Quantity(0, 'kilogauss')>, 'Field at pole tip for 16-polar component.', 11), 'B9': (<Quantity(0, 'kilogauss')>, 'Field at pole tip for 18-polar component.', 12), 'C0_E': (0, 'Zeroth-order Enge coefficient for entrance fringe field.'), 'C0_S': (0, 'Zeroth-order Enge coefficient for entrance fringe field.'), 'C1_E': (1, 'First-order Enge coefficient for entrance fringe field.'), 'C1_S': (1, 'First-order Enge coefficient for exit fringe field.'), 'C2_E': (0, 'Second-order Enge coefficient for entrance fringe field.'), 'C2_S': (0, 'Second-order Enge coefficient for exit fringe field.'), 'C3_E': (0, 'Third-order Enge coefficient for entrance fringe field.'), 'C3_S': (0, 'Third-order Enge coefficient for exit fringe field.'), 'C4_E': (0, 'Fourth-order Enge coefficient for entrance fringe field.'), 'C4_S': (0, 'Fourth-order Enge coefficient for exit fringe field.'), 'C5_E': (0, 'Fifth-order Enge coefficient for entrance fringe field.'), 'C5_S': (0, 'Fifth-order Enge coefficient for exit fringe field.'), 'COLOR': ('green', 'Magnet color for plotting.'), 'E10': (1, '20-polar entrance fringe field extent (E_10 * LAM_E).'), 'E2': (1, 'Quadrupole entrance fringe field extent (E_2 * LAM_E).'), 'E3': (1, 'Sextupolar entrance fringe field extent (E_3 * LAM_E).'), 'E4': (1, 'Octupolar entrance fringe field extent (E_4 * LAM_E).'), 'E5': (1, 'Decapolar entrance fringe field extent (E_5 * LAM_E).'), 'E6': (1, 'Dodecapolar entrance fringe field extent (E_6 * LAM_E).'), 'E7': (1, '14-polar entrance fringe field extent (E_7 * LAM_E).'), 'E8': (1, '16-polar entrance fringe field extent (E_8 * LAM_E).'), 'E9': (1, '18-polar entrance fringe field extent (E_9 * LAM_E).'), 'HEIGHT': (<Quantity(20, 'centimeter')>, 'Height of the magnet (distance between poles), used by plotting functions.'), 'IL': (0, 'Print field and coordinates along trajectories', 1), 'KINEMATICS': (None, 'A kinematics object.'), 'KPOS': (1, ''), 'LABEL1': ('', 'Primary label for the Zgoubi command (default: auto-generated hash).'), 'LABEL2': ('', 'Secondary label for the Zgoubi command.'), 'LAM_E': (<Quantity(0, 'centimeter')>, 'Entrance face fringe field extent'), 'LAM_S': (<Quantity(0, 'centimeter')>, 'Exit face fringe field extent'), 'LENGTH_IS_ARC_LENGTH': (False, ''), '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(30, 'centimeter')>, 'Pole width (used for plotting only).'), 'R0': (<Quantity(10.0, 'centimeter')>, 'Radius of the pole tips', 3), 'R1': (<Quantity(0, 'degree')>, 'Skew angle of the dipolar component'), 'R10': (<Quantity(0, 'degree')>, 'Skew angle of the 20-polar component'), 'R2': (<Quantity(0, 'degree')>, 'Skew angle of the quadrupolar component'), 'R3': (<Quantity(0, 'degree')>, 'Skew angle of the sextupolar component'), 'R4': (<Quantity(0, 'degree')>, 'Skew angle of the octupolar component'), 'R5': (<Quantity(0, 'degree')>, 'Skew angle of the decapolar component'), 'R6': (<Quantity(0, 'degree')>, 'Skew angle of the dodecapolar component'), 'R7': (<Quantity(0, 'degree')>, 'Skew angle of the 14-polar component'), 'R8': (<Quantity(0, 'degree')>, 'Skew angle of the 16-polar component'), 'R9': (<Quantity(0, 'degree')>, 'Skew angle of the 18-polar component'), 'REFERENCE_FIELD_COMPONENT': ('BZ', 'Orientation of the reference field (used by field maps)'), 'S10': (1, '20-polar exit fringe field extent (E_10 * LAM_S).'), 'S2': (1, 'Quadrupole exit fringe field extent (E_2 * LAM_S).'), 'S3': (1, 'Sextupolar exit fringe field extent (E_3 * LAM_S).'), 'S4': (1, 'Octupolar exit fringe field extent (E_4 * LAM_S).'), 'S5': (1, 'Decapolar exit fringe field extent (E_5 * LAM_S).'), 'S6': (1, 'Dodecapolar exit fringe field extent (E_6 * LAM_S).'), 'S7': (1, '14-polar exit fringe field extent (E_7 * LAM_S).'), 'S8': (1, '16-polar exit fringe field extent (E_8 * LAM_S).'), 'S9': (1, '18-polar exit fringe field extent (E_9 * LAM_S).'), 'XCE': (<Quantity(0, 'centimeter')>, ''), 'XL': (<Quantity(0, 'centimeter')>, 'Magnet length', 2), 'XPAS': (<Quantity(1.0, 'centimeter')>, 'Integration step.'), 'X_E': (<Quantity(0, 'centimeter')>, 'Entrance face integration zone for the fringe field.'), 'X_S': (<Quantity(0, 'centimeter')>, 'Exit face integration zone for the fringe field.'), 'YCE': (<Quantity(0, 'centimeter')>, '')}

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