Fake

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

Bases: zgoubidoo.commands.commands.Command

Fake command for Zgoubi input.

This command can be used to add an arbitrary input command in a Zgoubi input sequence. The INPUT parameter is formatted before being printed, and uses the OPTIONS command attributes list for that purpose (see examples below).

This can also be used to implement new commands easily by using formatted INPUT together with OPTIONS.

Examples

>>> c = Fake('FAKE1', INPUT="'COMMAND_NAME' {LABEL1} 1.0 2.0 3.0")
>>> str(c)

Command attributes

LABEL1=''

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

Type

str

LABEL2=''

Secondary label for the Zgoubi command.

Type

str

INPUT=''

Input string.

Type

str

Default initializer for all Commands.

Attributes Summary

PARAMETERS

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

Attributes Documentation

PARAMETERS: dict = {'INPUT': ('', 'Input string.'), 'LABEL1': ('', 'Primary label for the Zgoubi command (default: auto-generated hash).'), 'LABEL2': ('', 'Secondary label for the Zgoubi command.'), 'OPTIONS': ({},)}

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