bmad-sim / bmad-ecosystem

Bmad simulation ecosystem for simulating high energy storage rings.
https://www.classe.cornell.edu/bmad/
12 stars 15 forks source link

Translation from Bmad to Elegant: k1 of quad unexpectedly scaled by L_quad #611

Closed weiyuanlou closed 11 months ago

weiyuanlou commented 11 months ago

The previous modification to translate multipole seems to have introduced this new bug.

k1 of quad in Bmad should be translated directly to k1 of kquad in Elegant, but currently it's off by a factor of the length of the quad. Same thing happens to k2 of sextuple ( to ksext ) and k3 of octupole ( to koct ).

Translation of multipole ( for instance, B4 of a quad in Bmad to knl of a MULT with order 4 ) seems correct, and hopefully fixing the bug mentioned above would not affect this.

Feel free to discuss this with me on Bmad Slack. Thanks.

DavidSagan commented 11 months ago

I put in a fix.