bmad-sim / bmad-ecosystem

Bmad simulation ecosystem for simulating high energy storage rings.
https://www.classe.cornell.edu/bmad/
6 stars 13 forks source link

Tao's spin resonance strength calculation disagrees with Sprint #964

Open eiad-hamwi opened 1 month ago

eiad-hamwi commented 1 month ago

Attached is a toy lattice for the AGS and a plot of the horizontal resonance strengths as evaluated on resonant energies from Tao.

Similarly, Vincent extracted the horizontal resonance strengths using SPRINT, and we have disagreement:

spin_res_a_str_tao_vs_sprint.zip

eiad-hamwi commented 1 month ago

@mattsignorelli

eiad-hamwi commented 2 weeks ago

The spin tunes that Tao spits out do not reflect the lower right-hand corner of the 8x8 spin-orbit transport matrix. In particular, if we flip the N0-axis of the frame, the G-matrix is visibly changed (some new minus signs), but the spin tune remains the same whereas it should also be changing sign.

The green points are the values of spin tune calculated by taking arctan2 of the lower-right components of the 8x8 spin-orbit transfer matrix. The purple points are the spin tune values that are outputted and seem to be used in Tao's resonance analysis. 

One potential explanation behind this disparity is that it results from the imperfection resonances due to the addition of a partial snake.  These should create a discontinuity at integer values of Ggamma in both the spin tune and the choice of n0, or neither of them. In Desmond's conventions we usually choose to fix the n0 axis to the upper hemisphere, and make the spin tune jump explicit (as in the purple line).  However, in Tao it appears that the n0 is smooth, while the spin tune seems to still have the spin tune jump:

I've attached the lattice and plots below. toy_ags_resonances.zip

eiad-hamwi commented 1 week ago

Furthermore, by performing the correct analysis on the G-matrix results in choosing all the correct resonance strengths, whereas Tao chooses only half the correct choices of (sum vs difference) resonance strength in this lattice.

DavidSagan commented 1 week ago

@eiad-hamwi For the two lattices in the zip file can you show your analysis and which is off?

eiad-hamwi commented 1 week ago

Yes, I will write up and upload the analysis by end of day today.

Eiad

On Thu, Jun 27, 2024 at 10:47 AM David Sagan @.***> wrote:

@eiad-hamwi https://github.com/eiad-hamwi For the two lattices in the zip file can you show your analysis and which is off?

— Reply to this email directly, view it on GitHub https://github.com/bmad-sim/bmad-ecosystem/issues/964#issuecomment-2194927013, or unsubscribe https://github.com/notifications/unsubscribe-auth/AP2TV5QXYIZDTWZUEVD7M2DZJQQZDAVCNFSM6AAAAABHZERIUCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCOJUHEZDOMBRGM . You are receiving this because you were mentioned.Message ID: @.***>

eiad-hamwi commented 1 week ago

@DavidSagan I've attached a Julia-based Jupyter notebook containing the analysis with some comments to guide the eyes. G-matrix_analysis.zip