Giter Club home page Giter Club logo

Comments (5)

n01r avatar n01r commented on July 16, 2024 1

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.

np-eazy avatar np-eazy commented on July 16, 2024 1

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.

np-eazy avatar np-eazy commented on July 16, 2024 1

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.

ax3l avatar ax3l commented on July 16, 2024

@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.

ax3l avatar ax3l commented on July 16, 2024

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):

from impactx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.