SixTrack / sixtracklib

Library for single charged particle simulations in accelerators
GNU Lesser General Public License v2.1
12 stars 16 forks source link

Use `DriftExact` when using `from_mad` #71

Closed aoeftiger closed 5 years ago

aoeftiger commented 5 years ago

When loading a lattice from MAD-X into PySixTrackLib via beam_elements.Elements.from_mad, the converted lattice uses Drift instances (which are truncated) as opposed to DriftExact instances for the drifts. It would be good to be able to choose which one to take. I suggest by default to take DriftExact as this is the MAD-X thin lens tracking behaviour.

The following jupyter notebook shows the impact when comparing MAD-X tracking to SixTrackLib tracking: https://github.com/aoeftiger/sixtracklib_pyht_playground/blob/c01fe532b1b06673111c2629fc448e99fcf1e036/sis100/SIS100_driftExact_influence.ipynb

(can also be viewed here: nbviewer.jupyter.org/github/aoeftiger/sixtracklib_pyht_playground/blob/c01fe532b1b06673111c2629fc448e99fcf1e036/sis100/SIS100_driftExact_influence.ipynb )