Skip to content
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

Remove the dependency of find_orbit6 on the harmonic number #318

Merged
merged 2 commits into from
Oct 20, 2021

Conversation

lfarv
Copy link
Contributor

@lfarv lfarv commented Oct 18, 2021

find_orbit6 does not depend on the harmonic number any more. The RF frequency is deduced from the cavity having the lowest frequency in the ring. The harmonic number is deduced from the RF frequency and revolution frequency.

@lfarv lfarv added enhancement Matlab For Matlab/Octave AT code Python For python AT code labels Oct 18, 2021
@lfarv lfarv changed the title Remove the dependence of find_orbit6 on the harmonic number Remove the dependency of find_orbit6 on the harmonic number Oct 18, 2021
Copy link
Contributor

@swhite2401 swhite2401 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok for me

@lfarv
Copy link
Contributor Author

lfarv commented Oct 20, 2021

@carmignani pointed out here a potential problem for large frequency deviations. Looking at the equation for 6D closed orbit (see help(find_orbit6)):

    (X, PX, Y, PY, DP, CT2 ) = M (X, PX, Y, PY, DP, CT1)

    with M the one-turn 6D transfer matrix,
    and constraint  CT2 - CT1 = C*HarmNumber(1/Frf - 1/Frf0)

the harmonic number does play a role. For large deviations, taking the nearest harmonic might be wrong. So the initial code is right and its dependence on harmonic number is correct. Seeing this, I was tempted to close this pull request and keep the initial version.

But looking closer, here is what may happen: let's increase the frequency. The beam gets off-momentum and deviates from the central trajectory. If we reach a frequency deviation of one revolution frequency (which looks very optimistic…), the beam may very well jump back on axis and on momentum, running on a different harmonic number. At least if we re-inject, that's what will happen. I do not know when the beam may jump, is it at h + 1/2 ? However, the modified version of find_orbit6 seem to agree with what may happen in reality: the beam may stabilise around the nearest harmonic number, possibly not the design one.

So I tend to keep this version…

@swhite2401
Copy link
Contributor

Yes I agree this should be correct, but naively I would think that the beam slowly goes back on-momentum following the reduction of the fractional part of Frf*L0/C0

@lfarv
Copy link
Contributor Author

lfarv commented Oct 20, 2021

Anyway we are speculating about extremely large frequency deviations… So I merge as it is.

@lfarv lfarv merged commit c4fb929 into master Oct 20, 2021
@lfarv lfarv deleted the find_orbit6 branch October 20, 2021 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Matlab For Matlab/Octave AT code Python For python AT code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants