helper module
Define helper functions applying on elements.
- give_name_to_elements(elts, warn_default_element_names=True)[source]
Give to every
Elementthe name TraceWin would give it.
- force_a_lattice_for_every_element(elts)[source]
Give a lattice index to every element.
Elements before the first LATTICE command will be in the same lattice as the elements after the first LATTICE command.
Elements after the first LATTICE command will be in the previous lattice.
Example
Element/Command
Lattice before
Lattice after
QP1None
0
DR1None
0
LATTICEQP20
0
DR20
0
END LATTICEQP3None
0
LATTICEDR31
1
END LATTICEQP4None
1