madx file import #820
Replies: 11 comments
-
Hello @simoneliuzzo,
However it seems that the file is correctly processed. At least I get the "fcc_heb" sequence correctly (35938 elements).
And the step-by-step way:
I let you check if the result is correct… Now I have to understand why we get these lots of error messages. |
Beta Was this translation helpful? Give feedback.
-
Dear @lfarv,
then later in the code
or even
those are all allowed definitions in MADX |
Beta Was this translation helpful? Give feedback.
-
Yes, and it works indeed in AT also. As I said, your file seems to work correctly in spite of the error messages. |
Beta Was this translation helpful? Give feedback.
-
Dear @lfarv, here my code for testing:
as you can read in the comments, get_optics and plotbeta fail. It also fails to plot_beta in trasnferline mode and save_mat does not work as apparently the output lattice has a tuple rather than a string for the in_file property. So I switched to matlab for debug. There the transfer line mode plot is working and I get some result: The element that breaks the optics computation is: mb2_dis2.a2.001a
only weird thing I can see is the Length=0.
and |
Beta Was this translation helpful? Give feedback.
-
The summary of findings is:
|
Beta Was this translation helpful? Give feedback.
-
@simoneliuzzo : Very nice analysis, thanks ! It's very useful for improving the conversion. For the consequences:
For 0 length bending magnets, let's look at a comparison with straight magnets:
That's why I think that the only realistic solution for these elements is to ignore them. |
Beta Was this translation helpful? Give feedback.
-
@simoneliuzzo : by the way, can you check what happens if you set the |
Beta Was this translation helpful? Give feedback.
-
Dear @lfarv , apparently in MADX the dipole length is there, 11 meters (B. Dalena sent me the code) .
I checked the IdentityPass solution, here the results: It looks a nice solution. |
Beta Was this translation helpful? Give feedback.
-
@simoneliuzzo : Ok, so the forget the previous posts, a zero-length dipole is indeed non-physical, but the problem now is in the conversion. I look at that, thanks |
Beta Was this translation helpful? Give feedback.
-
The problem is in the "const" keyword, I never encountered it before and I missed it in the documentation. I have to look at what it means exactly. |
Beta Was this translation helpful? Give feedback.
-
Solved in #824 |
Beta Was this translation helpful? Give feedback.
-
Dear @lfarv,
The new feature of pyAT load_madx is extremely usefull. However, there are some files that appear difficult to convert such as the one attached here below, that includes hierarchic element class definitons.
Would it be easy to include this MADX feature in the conversion?
heb_ring_wcav_wqsc.txt
thank you
best regards
Beta Was this translation helpful? Give feedback.
All reactions