7.69 save_lattice
- type: action command.
- function: save the current accelerator element and beamline definitions.
- Command syntax, including use of equations and subcommands, is discussed in 7.2.
&save_lattice
STRING filename = NULL;
long output_seq = 0;
long suppress_defaults = 1;
STRING comment = NULL;
&end
- filename — The (incomplete) name of a file to which the element and beamline definitions
will be written. Recommended value: “%s.new”.
- output_seq — If non-zero, the lattice will be saved as a single beamline sequence, in one of two
ways: For output_seq=1, the sequence is contained in a series of 40-element sub-beamlines.
For output_seq=2, the sequence is contained in a single long beamline definition. Elements
used for the beamline are re-arranged according to their type. Note: sub-beamline definitions
in the original lattice file will be destroyed from the output file. This feature is intended to
be used together with insert_elements and replace_elements.
- suppress_defaults — If non-zero, the lattice will not contain default values of parameters.
- comment — If given, this text is written as a comment at the top of the saved file. Each line
is prefixed with the lattice comment character “!”, so the saved file can still be read back by
elegant. This is useful for recording provenance, e.g., how or when the lattice was generated.
Multiline comments can be specified by placing \n in the text as an end-of-line indicator.