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

Multipole Elegant vs MADx #65

Open tomerten opened 4 years ago

tomerten commented 4 years ago

Multipoles are very differently implemented:

When I convert from madx or elegant returns "2 different lattice json file, we should discuss which one we want to keep and adapt the converters and parsers. So converting back to elegant and madx is return false formats - in the example below elegant is correct madx is faulty:

to madx

OXX: MULTIPOLE, L=0.0, KNL=-679.686, BOE=3;
OXY: MULTIPOLE, L=0.0, KNL=1331.5866, BOE=3;
OYY: MULTIPOLE, L=0.0, KNL=-617.0892, BOE=3;

should be

oxx    : multipole, knl={0,0,0,-679.6860};
oxy    : multipole, knl={0,0,0,1331.5866};
oyy    : multipole, knl={0,0,0,-617.0892};

to elegant

OXX: MULT, L=0.0, KNL=-679.686, ORDER=3
OXY: MULT, L=0.0, KNL=1331.5866, ORDER=3
OYY: MULT, L=0.0, KNL=-617.0892, ORDER=3