Xsuite converter#1047
Conversation
|
Hello @swhite2401 : very interesting !
|
|
@swhite2401 : I am indeed following this: it's very interesting. May be you could have a look at Mad reading/writing thee there are similar things: JSON encoding, defining unique element names for instance… |
Ok great! Don't hesitate to jump in if you have ideas, I consider this PR as a test branch for the moment, I am not particularly attached to this implementation so feel free to make changes if you se places that could be improved! And if you want to participate in the benchmarking discussion I can also put you in the loop, let me know! |
|
@swhite: there are indeed many similarities between this implementation and the one for MAD or Elegant. I think it would be interesting to use the same names for similar things. For instance, the MAD parser uses element classes very similar to your
I think it could be easier for maintenance to have the same names. I could work on that (I just spent a lot of time cleaning the MAD parser), and the best way not to interfere with your tests is to work on another branch. But the difficulty is to keep track of all the corrections you would do simultaneously… |
|
2nd point: I am also interested in your benchmarking. It could reveal problems in Mad files. For instance I noticed that you recently added a |
|
@swhite2401 We had the same question in AT, which was answered in #695 by raising an exception if redundant or conflicting information is given. Here, one should choose between
|
Hello @lfarv I agree that startting a new branch with a clean implementation would be better, for the benchmarking I do not need to convert lattices for the moment, I will report finding in the new PR so you can integrate them |
Yes this is a bit empirical, in fact I suspected a particle charge issue.... I have been mostly running 4D simulations so far so I did not look further into this. |
In Xsuite the knl arrays are mutlipole field errors: they are added the the main strength so there is no conflict. |
Next point: is the format of Xsuite json files documented ? Or did you do reverse engineering ? |
I did reverse engineering and it was very painful! Their file format is a mess they basically save the whole environment. |
|
@swhite2401 : Yes, I'm interested in example files (just to make sure I do not break things you had so much difficulties to set up) |
This PR implements an Xsuite converter.
Xsuite is not required for this to work as everything is handled using json files.
This is still work in progress fro the moment, comments and suggestions welcome!