- type: action command.
- function: Insert elements into a beamline at specified locations. This is a convenient way to
add elements to a beamline without modifying the lattice file.
- sequence: must follow run_setup.
- notes: The modified beamline can be saved through save_lattice command. Be sure to use
“output_seq = 1” option in that command.
- Command syntax, including use of equations and subcommands, is discussed in 7.2.
STRING name = NULL;
STRING type = NULL;
STRING exclude = NULL;
double s_start = -1;
double s_end = -1;
long skip = 1;
long disable = 0;
long insert_before = 0;
long add_at_end = 0;
long add_at_start = 0;
STRING element_def = NULL;
long total_occurrences = 0;
- name — Possibly wild-card containing string specifying the names of the elements after which
the new element is inserted. A list of comma- or space-separated names may be given.
- type — Possibly wild-card containing string specifying the type of the elements after which
the new element is inserted.
- exclude — Possibly wild-card containing string specifying the names of elements to be
excluded from the specification.
- skip — New elements are inserted at every nth specified location.
- s_start, s_end — If positive, these give the starting and ending s locations for insertion of
new elements. Note that the s locations are not updated as elements are inserted, but only
after completion of all insertions covered by a single command.
- disable — If nonzero, the command is ignored.
- insert_before — If nonzero, the insertions are before the selected elements. By default,
insertion is after the selected elements.
- add_at_end — If nonzero, the element is also inserted to the end of the beamline.
- add_at_start — If nonzero, the element is also inserted to the start of the beamline, ahead
of all other elements.
- element_def — The definition of the new element should be just as it would be entered in
the lattice file.
- total_occurrences, occurrence — These parameters are used to insert the new elements
after specified occurrences of the element name. total_occurrences specifies how many new
elements to add, up to a maximum of 100, while the entries in the array occurrence specify
the occurrences after which to add the new elements. If total_occurrences is non-zero, then
skip must be set to zero and the name must be the exact name (no wild-card matching).