Comments (5)
This is the link to the Python MADX parser that Andreas Adelmann wrote and pushed to a repo
https://gitlab.psi.ch/adelmann/pymadxparser.git
Implemented via #214
from impactx.
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.
from impactx.
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.
from impactx.
@qianglbl and @cemitch99 mentioned:
MAD-X also has an "optics" command that can output a simple CSV file with one element per row. IMPACT-Z can read this file in.
We might want to add support to:
- write the same file format for the lattice from ImpactX
- read in the same file format to initialize our lattice.
Optics CSV file structure
Columns 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.
from impactx.
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):
- https://bitbucket.org/berkeleylab/warp/src/master/scripts/lattice/lattice.py
- https://warp.lbl.gov/how-tos/lattice/adding-lattice-elements
from impactx.
Related Issues (20)
- User-Defined Linear Map
- Spin Tracking
- install with conda error: Symbol not found: __ZN5amrex6OpenMP9omp_locksE HOT 5
- Error message HOT 37
- How to make test run HOT 6
- Question about electron beam parameters HOT 12
- Document Conversion from Alternative Input Parameters HOT 28
- LUMI: CPU Setup HOT 1
- Preparing an input file HOT 4
- Data Analysis: What is the `analysis_...py` file? HOT 3
- IMPACT-T vs ImpactX HOT 14
- Exact sbend returns NaN for certain beam/element input values
- MAD-X Reader: Document in User-Facing Example
- Add Yourself to Our Community Map! :sparkles: HOT 1
- PyTest Tests: Ensure Individually Runable
- Plotting help HOT 5
- Initial checks for beam distribution HOT 1
- Parameter conversion HOT 3
- Document openPMD particle "columns" if read back to a dataframe
- Run Mode: Only Reference Particle
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from impactx.