-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exact pass #574
Exact pass #574
Conversation
atradon/atradoff not working in this branch. *Rad equivalents are needed before merge. |
atx emittance computation fails. Likely ohmi envelope internal tracking must also become aware of the new integrators b = struct with fields:
|
missing ExactBendPass and ExactBendRadPass |
missing tests of each passmethod. |
Hello @simoneliuzzo , sorry I haven't been very good at providing these benchmarking test, I will get on to it. |
@simoneliuzzo : summary of the answers to your questions:
exactMultipoleRadPass looks easy to implement. Once this is done, I would suggest merging ExactDrift and ExactMultipole
This is much more difficult: ohmi_envelope does not accept anything else that BndSymplectic4RadPass (no wigglers, no ids…). I even don't know how we can solve this.
ExactBendPass works and give results identical to ExactHamiltonianPass. But there are 2 big problems:
|
Hello @lfarv, this is a big problem...could we use the development on the 6D optics to generalize ohmi envelop to any element sequence? I find it very disturbing that 2 tracking engines are used in AT.... For the rest I agree with your proposal |
Yes and no… The problem is that However… The emittance computation is not affected by the small difference between "linear" and "exact" passes. We are talking of a single pass around the ring, along the closed orbit (no transverse amplitude). With no errors, it's strictly identical. So the added value of this large development is close to zero… It's more a matter of principle. |
@simoneliuzzo and @swhite2401 : while thinking of this, I found the reason for the "focusing" problem: So finally, it seems that the present integrator is right, but it describes a very special kind of magnet. Introducing face angles still looks still possible, but describing a curved magnet means writing a completely different iterator. Without focusing, the shape does not matter, the integrator may be used. |
Well don't necessarily agree with that, this is a recurring question (if not a problem) that we get as a feedback on AT. Especially the wiggler and ids (again something that we have talked a lot about) not having any effect on emittance. I would personally find it very uncomfortable to have to switch passmethods in a lattice whether I want to get the correct emittance or the correct phase space. That being said, it does seem like a big development... |
Ah and I have a side comment, that should be a much easier fix, why is the C part of ohmi_envelop buried into atmat?? Wouldn't it make more sense to put where all the C code is located? |
for me there is no need to rewrite integrators. We could simply modify the lattice inside ohmi_envelope such as any intetegrator not known by ohmi_enevelope is converted to what ohmi_envelop accepts: ExactBendPass -> BndMPole..., ExactMultipolePass --> StrMPole... , ExactDriftPass --> DriftPass etc... with adequate modification to the help |
perfect for me! then we can think of ExactBend in an other PR. |
@swhite2401, @simoneliuzzo : here is an idea of how we could progress in computing the equilibrium emittance in a more general way. I'm not yet sure it works, but I would like your comments on the idea:
Merging what's in |
@lfarv, I think it would be beneficial to centralize as much as possible the C tracking functions |
@swhite2401 : That's exactly what I propose: a single C file for both tracking and diffusion matrix. The entry points must be separated because the computation of diffusion takes much longer than a simple tracking, and we don't want to significantly slow down the tracking. Inside, a single function will track and optionally compute the diffusion. Both are interleaved, so the merge is tricky, but that can be done. |
Yes, I was giving you my positive opinion on your proposal... seems tricky as you say but if you think it is possible and would like to take a look, I think it is a nice development |
I'll make a trial with |
Done in #581 |
I add here an other issue found using pyAT and the Exact*Pass
File "/machfs/liuzzo/FCC/FCC_py38_venv/lib/python3.8/site-packages/at/load/allfiles.py", line 58, in load_lattice |
@simoneliuzzo : As usual, in that case, you can bypass the "coherence tests" by using |
There is significant progress on this branch:
In addition, all is ready for an |
Dear @lfarv and @swhite2401, I restored a benchmarking function MADX-PTC vs AT that I wrote in 2017. I am running tests on FCC-ee lattice, I will let you know the results. let me know if this is correct |
Hello @simoneliuzzo and @swhite2401 Basically, you test makes sense, however I have some remarks about
I'll make sure to-morrow that #581 is up to date, while this branch (#574) is my working branch (WIP), so don't trust it ! |
Continuation: I have now implemented all Forest's formulae (the ones from PTC) for rectangular bend, sector bend, edge focusing, fringe field…, but there are still problems: first order is correct (tunes, optical functions…), but I still have problems with horizontal chromaticity and with symplecticity (unexpected anti-damping). Either there are still bugs in coding, or there are errors in my sources (the book and some Forest notes)… You can have a look at the code in this branch if you are interested ! Everything is in |
Dear @lfarv and @swhite2401 I have some initial comparisons. here find the phase space plots for the initial case, no exact pass Then I replace Drifts with ExactDriftPass And then Drifts and Multipoles with the equivalent Exact*Pass This looks ok in the H plane. less in the Vertical plane. If I sum the distances of all corresponding points in phase space this is the residual I use only 4D initial coordinates. For those with access to ESRF filesystem, the scripts to produce the figures above are in: /machfs/liuzzo/accelerator_toolbox_tests/matlab/exactpass |
at.load_mat() of a lattice with Exact*Pass passmethods fails in pyAT . |
Should we close this one? |
@swhite: I think all the issues have been addressed in #581. There is just in a previous comment a discussion about the computation of diffusion matrices which could be moved to a discussion item. |
no objection |
I opened a discussion on diffusion matrices and close this PR |
I open this draft pull request for the exact_pass branch in order to list the issues I find while using the branch.
The exact_pass branch implements 2 additional PassMethods ExactDriftPass and ExactMultipolePass. Those are necessary for drift and multipoles with strong variations of optics, such as in final focus lattices for colliders.