General computation of diffusion matrices #715
Replies: 7 comments
-
I have not enough knowledge on the trackFunction and .c code. |
Beta Was this translation helpful? Give feedback.
-
Thanks for extracting this comment and moving it into discussions. It had been lost in PR comments… I think the proposal is still valid, but I did not spend any time on that. However, I'm surprised by @simoneliuzzo's problem: in my tests, ExactSectorBendRadPass gives correct damping times and emittances. Though it does not use the exact passmethod to compute the diffusion matrix, as previously mentioned. |
Beta Was this translation helpful? Give feedback.
-
Hello, |
Beta Was this translation helpful? Give feedback.
-
Hi all |
Beta Was this translation helpful? Give feedback.
-
I agree about putting the |
Beta Was this translation helpful? Give feedback.
-
Hi @carmignani: sorry to intervene in your plan… I started to look at that as soon as @swhite2401 revived the topic, and adopted your proposal of keeping a single entry point in integrators. So at the moment, I have BndMPoleSymplectic4Pass and StrMPoleSymplectic4Pass working, with the python interface. The Matlab interface is a bit more delicate, I'm now working on it. It will take some more time for the "exact" passmethods since we have to derive the correct formalae, but I see how it will work. |
Beta Was this translation helpful? Give feedback.
-
Hi @lfarv and @carmignani, we realized GWigSymplecticRadPass does not contribute in the present ohmienvelope version but I guess it would be nice to add it in this new strategy. Are you planning to work on it as well? Maybe @mashl? Otherwise we are starting to review the topic student, so let us know if you want some help! |
Beta Was this translation helpful? Give feedback.
-
from(@lfarv) @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:
Add a new entry point in the concerned integrators: this new entry point has the same input arguments as trackFunction: particle coordinates and element description. It has an additional output argument, returning the diffusion matrix. Internally, this will call a single integrator function with a flag triggering the computation of diffusion if necessary. This can be tested in BndMPoleSymplectic4RadPass, and then generalised to other integrators. At 1st glance, one could reproduce the diffusion computation for all integrators using a drift-kick sequence: BndMPoleSymplectic4RadPass, StrMPoleSymplectic4RadPass, GWigSymplecticPass. And probably their "Exact" counterparts, to be checked. This development works for both Matlab and python.
In ohmi_envelope, replace findmpoleraddifmatrix by a kind of copy of at.c (python) or atpass.c (Matlab). It deals with a single element (not the whole line as at.c), and has to load the required shared libraries, build the table of entry points, and call the one selected by the element. And returns the diffusion matrix !
Merging what's in findmpoleraddifmatrix and in BndMPoleSymplectic4RadPass is not easy, but looks possible.
Beta Was this translation helpful? Give feedback.
All reactions