-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MAD-X input reader: constants, elements, lines, segments #104
Comments
@qianglbl and @cemitch99 mentioned: We might want to add support to:
Optics CSV file structureColumns with names (column 1), type (column 2) and values: meaning of the column depends on the element type (column 2). Values: note that parameters are not in that CSV file, e.g., fringe-field details. |
With the new Python layer, we could also implement the first MAD(-X) reader on the Python side. Warp has some routines we can get logic from (@jlvay): |
This is the link to the Python MADX parser that Andreas Adelmann wrote and pushed to a repo Implemented via #214 |
https://github.com/MethodicalAcceleratorDesign/MAD-X/blob/master/src/mad_parse.c is the current source code where parsing seems to happen. I'll have to look closer to see what it is parsing into, and how that connects with any notion of a persistent structure of environments. My planned approach right now is to mod the source code such that it reads MadX scripts normally, but instead of executing on LHC or some other particle accelerator the information is kept in some notion of an environment; upon script end or intended pause, the environment is DFS-traversed and dumped onto a general YAML or JSON. Right now I intend on only a static implementation of an accelerator's initial state; anything and everything in the MadX file refers to t=0 for the simulation. |
Mad-X Parser Notes.pdf I am no longer working on this issue. Here are my design notes and plans moving forward with implementing this issue. |
We want to support reading accelerator lattices directly from MAD-X input files.
For this, we will need to support at least the following syntax elements:
from MAD-X definitions.
For that, we could explore if @janfschmidt's
palattice
could be used as a library :)https://github.com/janfschmidt/palattice
References on MAD-X:
Example files for MAD-X lattices:
The text was updated successfully, but these errors were encountered: