New fastring - #1082
Conversation
|
@lfarv, @lcarver, @oscarxblanco this is still WIP and more testing is needed but I believe all the functionalities requested are now implemented. Please take a first look and let me know if you see something that needs to be modified/improved. |
|
For the moment the new function is in |
|
@swhite2401 chrom_arr, *_ = at.chromaticity(ring, order=15, npoints=31, dpm=0.02)
_, dnuwa, *_ = at.detuning(ring)
fast_ring, split_ring = fast_ring_new(ring, keep_cavities=True, detuning_coeff=[dnuwa[0,0],dnuwa[0,1],dnuwa[1,1]])
I will now test tracking an off-energy particle and adding the non-linear chromaticiy to the new fast ring. |
|
@swhite2401 , I saw the coefficients returned by |
I had the same issue and yes the coefficients are multiplied by I will add a word in the documentation of chromaticity. |
I am surprised that you had to manually add them, if not specified they should be automatically computed form the input lattice. |
|
@swhite2401 , I still don't manage to get an off-energy particle tracking with a good result. chrom_arr, *_ = at.chromaticity(ring, order=3, npoints=31, dpm=0.02)
_, dnuwa, *_ = at.detuning(ring)
fast_ring, split_ring = fast_ring_new(ring, keep_cavities=True,
detuning_coeff=[dnuwa[0,0],dnuwa[0,1],dnuwa[1,1]],
qpx = chrom_arr[0,:],
qpy = chrom_arr[1,:],
)
...
zin[4] = zin[4] + 10e-3 |
Be carefull the first element of chrom_arr is the tune, you fastring instanciation should be: fast_ring, split_ring = fast_ring_new(ring, keep_cavities=True,
detuning_coeff=[dnuwa[0,0],dnuwa[0,1],dnuwa[1,1]],
qpx = chrom_arr[0,1:],
qpy = chrom_arr[1,1:],
) |
|
@swhite2401 , all OK for off-energy particles up to 0.1%. zin[4] = zin[4] + 10e-3
I will try the non-linear momentum compaction factor.
|
Sure you can but I suspect it would change much, the transfer matrices and other quantities are computed around the on-momentum closed orbit so as you deviate form this it is not a surprise that it starts diverging. If you need to use the fast ring off-momentum I can add a dp argument to compute everything around the dispersive orbit, would you find it useful? |
Ok I will add it |
|
@swhite2401 , could the amplitude detuning be a polynom ? |
Yes I could add this |
|
@oscarxblanco , for the amplitude detuning, everything is new done w.r.t. action which is cumbersome when going to higher orders, I would like to change this to simplify the implementation. Is the rest of the code ok for you? Can I start cleaning up this PR and prepare for the merge? |
|
@swhite2401 , all the rest looks OK for me. The current detuning as a function of action already works, and the polynomial amplitude detuning might not be necessary. |
Ok I start cleaning up and wait for @lcarver approval. But let's see it is a good occasion to improve the detuning function, maybe in a separate PR. Let's see. |
|
@lfarv , @lcarver I believe this is getting ready to merge. Any further comments? Concerning the non-linear amplitude detuning requested by @oscarxblanco , I think I will keep it for another PR as this is one is already quite large. |







This PR proposes a new implementation for the fast ring allowing to switch radiations on and off with standard lattice function.
Only one lattice object is then produced.
It is also possible to model higher order chromaticity terms with manual input. The automated generation considers only linear terms. This is safer since fit parameters have to be adapted depending on the order the the user wants to consider.