helper module
Define helper functions applying on elements.
- give_name_to_elements(elts: Sequence[Element], warn_default_element_names: bool = True) None
Give to every
Elementthe name TraceWin would give it.
- force_a_section_for_every_element(elts: Sequence[Element]) None
Give a section index to every element.
- force_a_lattice_for_every_element(elts: Sequence[Element]) None
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