AutoRef

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

Bases: zgoubidoo.commands.commands.Command

Automatic transformation to a new reference frame.

Zgoubi manual description

AUTOREF positions the new reference frame following 3 options:

  • If I = 1, AUTOREF is equivalent to CHANGREF[XCE = 0,Y CE = Y (1),ALE = T(1)] so that the new reference frame is at the exit of the last element, with particle 1 at the origin with its horizontal angle set to T = 0.

  • If I = 2, it is equivalent to CHANGREF[XW,Y W,T(1)] so that the new reference frame is at the position (X W, Y W ) of the waist (calculated automatically in the same way as for IMAGE) of the three rays number 1, 4 and 5 (compatible for instance with OBJET, KOBJ = 5, 6, together with the use of MATRIX) while T(1), the horizontal angle of particle number I1, is set to zero.

  • If I = 3, it is equivalent to CHANGREF[XW,Y W,T(I1)] so that the new reference frame is at the position (X W, Y W ) of the waist (calculated automatically in the same way as for IMAGE) of the three rays number I1, I2 and I3 specified as data, while T(I1) is set to zero.

Command attributes

LABEL1=''

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

Type

str

LABEL2=''

Secondary label for the Zgoubi command.

Type

str

I='1'

Mode (1, 2 or 3).

Type

int

I1='1'

Particle number (only used if I = 3)

Type

int

I2='1'

Particle number (only used if I = 3)

Type

int

I3='1'

Particle number (only used if I = 3)

Type

int

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

Keyword of the command used for the Zgoubi input data.

PARAMETERS: dict = {'I': (1, 'Mode (1, 2 or 3).'), 'I1': (1, 'Particle number (only used if I = 3)'), 'I2': (1, 'Particle number (only used if I = 3)'), 'I3': (1, 'Particle number (only used if I = 3)'), 'LABEL1': ('', 'Primary label for the Zgoubi command (default: auto-generated hash).'), 'LABEL2': ('', 'Secondary label for the Zgoubi command.')}

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