-
Notifications
You must be signed in to change notification settings - Fork 32
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
RF cavity tuning: introduce fundamental frequency #334
Conversation
Hi @swhite2401 . I'll be back home and have more time to look at that next week, but I have a first comment on For a ring where the energy varies along the circumference, the definition of the machine energy, and consequently of the nominal frequency is somewhat arbitrary: is the machine energy (dp/p = 0) the average one, the minimum or the maximum one ? the nominal frequency will be different… At the moment, I see 2 options:
Here you are proposing a 3rd definition: the machine energy (dp/p = 0) is the energy at the 1st point of the lattice. This definition as a drawback that makes it unacceptable: the nominal frequency depends on the choice of the starting point of the lattice ! That cannot be, the nominal frequency must be independent of the choice of the starting point. We could accept any other definition satisfying this requirement, but not the one you propose… Note that the AT definition also ensures that the nominal frequency in independent of the location of the cavities: practically, the "nominal" machine energy (not the local one) does not change if you change to voltage distribution between cavities along the ring. |
Ah right, thanks @lfarv. In fact I don't really care about the notion of nominal frequency, for me it is defined as the corresponding to the nominal circumference but does not mean much in realistic simulations with errors etc.... This is why it can be useful for some application where the path length does not match the circumference to adjust the RF frequency. I agree this one is not good, I'll propose something else soon. |
Late night post-shift thinking: I did have this in my scripts to cancel initial offset for impedance simulations and generate a beam at dp,ct=0,0. Clearly not appropriated here, I will remove this from this branch, the most important part is all the rest in any case. |
Ok, perfect. Give me some time to look at that, not before next week… |
Sure no rush. I will implemented the average orbit cancellation that could be of some interest to simulate control room conditions |
New version with a single mode of operation (always "fundamental mode"). |
ca4de2e
to
4c19dd6
Compare
* New cavity control * Small change in html doc Co-authored-by: Laurent Farvacque <[email protected]>
cavity_access.py
is modified to give more flexibility, 3 modes are introduced:-
RFMode.UNIQUE
present implementation
-
RFMode.ALL
returns array of all cavities
-
RFMode.FUNDAMENTA
L (proposed new default)uses the lowest frequency cavities as reference, the getters returns attributes of the fundamental cavities. The setters affect all cavities maintaining the following relations between the fundamental and harmonics.
-
frequency
: keep constant ratio-
voltage
: keep constant ratio (apply scale factor based on variation of total voltage)-
timelag
: keep constant offsetThis provides a a realistic and flexible way of tuning cavities and is fully compatible with complex systems involving multiple (accelerating) RF systems and solves some of the issues of the present implementation that was allowing to tune only one harmonic at the time.
cavpts
can still be used to exclude bunch lengthening cavities.revolution.py
is improved to allow to set the rf frequency based onorbit6
search: the rf frequency can be set to cancel the average orbit as is generally done in the control room