nobeam / latticejson

A JSON based lattice file format
https://nobeam.github.io/latticejson
GNU General Public License v3.0
12 stars 2 forks source link

Add MADX parser #39

Closed felix-andreas closed 4 years ago

felix-andreas commented 4 years ago

Fixes #10

felix-andreas commented 4 years ago

@HZBries @PaulGoslawski @tomerten

I have added the initial implementation of the MAD-X parser.

As it MADX is a complete scripting language, this parser only implements a subset of the MAD-X statements. But it should be sufficient for most lattice files:

felix-andreas commented 4 years ago

One outstanding issue is, that LatticeJSON has currently no DipoleEdge element, because the entrance and exit angles can also be set in the Dipole definition.

This leads to the Problem that Dipedge elements of MADX are replaced by Drift spaces. This is indicated by a warning.