Improve MAD file handling #1049
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an improvement of the processing of mad-style files: MAD-X, MAD8, Elegant.
The initial goal is to prepare for AT parameterisation of Elements. This is the last step before parameterisation, where MAD variables could be used as Element parameters like any native AT parameter. This implied significant internal modifications which turned beneficial even without the actual parameterisation. For instance a cleaner definition of the scope used for evaluation of MAD expressions, which is now distinct from the module scope. And a better efficiency.
The modifications only concern MAD-file processing, which I tested with my ~10 sample files. Feel free to test with yours, but nothing else in AT behaviour is concerned.