This repository is used to manage the lattices shown on the lattice-summaries website. Every time a new lattice file is pushed to this repository, it automatically gets converted into serval lattice file formats. The resulting lattice files are stored on the generated
branch. The orignal lattice file is stored in the originals
folder on the main
branch.
The lattices are converted using the LatticeJSON package. To convert all lattice files into the different formats run: (requires Python 3.8+ and Poetry)
poetry install
poetry run doit
The resulting lattices files are saved to the generated
folder and can be published by pushing this folder to the generated
branch.
goslawski/add-mls2-lattice
)originals/<namespace>
folder. (see naming scheme)info.toml
file. (see below)add goslawski/mls2_<family>_v_<version>
for a newly added lattice.update goslawski/mls2_<family>_v_<version>
in case a lattice file is updated.Meta information on the lattices is listed in the info.toml
file. If you add a new lattice to this repo don't forget to add an entry to this file:
# example entry
[[lattices]]
namespace = "goslawski"
name = "mls2_scaled-from-bessy2_v_1"
machine = "mls2"
title = "mls2 based on bessy2"
authors = ["Goslawski", "Max Mustermann"]
energy = 1200
simulations = ["apace", "elegant", "madx"]
labels = []
description = """
A possible design lattice for the MLS2 based on a scaled down version of BESSY 2
"""
Most of the attributes should be self-explanatory. A list of available labels is listed below:
:memo: TODO@michael: add list of useful labels
To leverage multiple simulation tools we have to convert lattice files into different formats. As these lattice file formats can contain tool-specific elements/attributes (and somethings are turing-complete scripting languages), a 1:1 translation between the different lattice file formats is not always possible.
We agree on a restricted set of generic elements, which should be available in every simulation software and define a 1:1 mapping between these generic elements and the different lattice file formats. We should also avoid simulation-specific attributes (e.g. nkicks
), which should be included in the run files. Control-flow like if
statements or for
loops are also not allowed. Only basic variable assigned and basic sequence manipulation (reflection and repetition) is permissiable. A detailed specification of allowed elements/attributes can be found below.
Generic Element | MAD-X | elegant | TRACY | OPA |
---|---|---|---|---|
Drift | drift | drif | ||
Dipole | sbend | csbend | ||
Quadrupole | quadrupole | kquad | ||
Sextupole | sextupole | ksext | ||
Octupole | octupole | koct | ||
Cavity | rfcavity | rfca |
Generic Attribute | MAD-X | elegant | elegant | TRACY | OPA | description |
---|---|---|---|---|---|---|
length | l | l | length | |||
angle | angle | angle | deflection angle | |||
e1 | e1 | e1 | entrance angle | |||
e2 | e2 | e2 | exit angle | |||
k1 | k1 | k1 | geometric quadrupole strength |
Generic Element | MAD-X | elegant | TRACY | OPA |
---|---|---|---|---|
Drift | drift | drif | ||
Dipole | sbend | csbend | ||
Quadrupole | quadrupole | kquad | ||
Sextupole | sextupole | ksext | ||
Octupole | octupole | koct | ||
Cavity | rfcavity | rfca |
Generic Attribute | MAD-X | elegant | TRACY | OPA | description |
---|---|---|---|---|---|
length | l | l | length | ||
angle | angle | angle | deflection angle | ||
e1 | e1 | e1 | entrance angle | ||
e2 | e2 | e2 | exit angle | ||
k1 | k1 | k1 | geometric quadrupole strength |
Generic Attribute | MAD-X | elegant | TRACY | OPA | description |
---|---|---|---|---|---|
length | l | l | length | ||
k1 | k1 | k1 | geometric quadrupole strength |
Generic Attribute | MAD-X | elegant | TRACY | OPA | description |
---|---|---|---|---|---|
length | l | l | length | ||
k2 | k2 | k2 | geometric sextupole strength |
Generic Attribute | MAD-X | elegant | TRACY | OPA | description |
---|---|---|---|---|---|
length | l | l | length | ||
k3 | k2 | k3 | geometric octupole strength |
Information like the energy, periodicity, number of bends per cell and other details (e.g. longitudinal gradients bend) which characterize a lattice will be included in the info.toml
file, so it is not necessary that they are present in the filename.
As we want to distribute the lattice files over the web we have restrict us to the unreserved URL characters A-Za-z0-9.~-_
.
The naming schema of a lattice file is given by:
<namespace> / <machine>_<familiy>_v_<version>
A name is built up out of different `