Closed zihan-zh closed 1 month ago
I believe this is due to different naming conventions. We used the OCELOT parameters where gap(cheetah, ocelot) = 2 * hgap (MAD, BMAD)
, See
https://github.com/desy-ml/cheetah/blob/3038c7b51b40a7dd36c4a2c105dbd030c86da743/cheetah/accelerator/dipole.py#L31)
So the actual issue is the incorrect converter class... This should be fixed: https://github.com/desy-ml/cheetah/blob/3038c7b51b40a7dd36c4a2c105dbd030c86da743/cheetah/converters/bmad.py#L148
There is a missing coefficient in the fringe field effect calculation for dipole magnets in the current implementation. According to the formula 18.16 in Bmad manual, a coefficient of 2 should be implemented into the phi value calc in
Dipole._transfer_map_enter
andDipole._transfer_map_exit
.