GetFitVal

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

Bases: zgoubidoo.commands.commands.Command

Get values of variables as saved from former FIT[2] run.

This keyword allows reading, from a file whose name needs be specified, parameter values to be assigned to optical elements in zgoubi.dat. That file is expected to contain a copy-paste of the data under the FIT[2] procedure as displayed in zgoubi.res, normally under the form.

# STATUS OF CONSTRAINTS # TYPE I J LMNT# DESIRED WEIGHT REACHED KI2 * Parameter(s) # 3 1 2 127 0.0000000E+00 1.0000E+00 1.0068088E-08 6.0335E-01 * 0 : # 3 1 3 127 0.0000000E+00 1.0000E+00 7.0101405E-09 2.9250E-01 * 0 : # 3 1 4 127 0.0000000E+00 1.0000E+00 2.9184383E-10 5.0696E-04 * 0 : # 3 1 5 127 0.0000000E+00 1.0000E+00 3.1142381E-10 5.7727E-04 * 0 : # 3 1 2 436 0.0000000E+00 1.0000E+00 3.8438378E-09 8.7944E-02 * 0 : # 3 1 3 436 0.0000000E+00 1.0000E+00 1.5773011E-09 1.4808E-02 * 0 : # 3 1 4 436 0.0000000E+00 1.0000E+00 2.2081272E-10 2.9022E-04 * 0 : # 3 1 5 436 0.0000000E+00 1.0000E+00 5.7930552E-11 1.9975E-05 * 0 : # Function called 1859 times # Xi2 = 1.68006E-16 Busy…

A ’#’ at the beginning of a line means it is commented, thus it will not be taken into account. However a copy-paste from zgoubi.res (which is the case in the present example) would not not need any commenting. Since some of the FIT[2] variables may belong in [MC]OBJET, GETFITVAL may appear right before [MC]OBJET in zgoubi.dat, to allow for its updating.

Command attributes

LABEL1=''

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

Type

str

LABEL2=''

Secondary label for the Zgoubi command.

Type

str

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

Keyword of the command used for the Zgoubi input data.

PARAMETERS: dict = {'FNAME': ('zgoubi.res',), '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).