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

atenergy computes the harmonic number from the RF frequency #350

Merged
merged 5 commits into from
Jan 19, 2022

Conversation

lfarv
Copy link
Contributor

@lfarv lfarv commented Jan 12, 2022

atenergy does not rely any more on the HarmNumber field of cavity elements. It computes the harmonic number from the frequency of the 1st RF cavity.

@lfarv lfarv added the Matlab For Matlab/Octave AT code label Jan 12, 2022
@carmignani
Copy link
Member

Hello, I think the harmonic number is stored in the ringParam element, if that exists. So maybe atenergy should first check there, and after it can computes from the frequency of the first cavity if there is no ringParam element.

@lfarv
Copy link
Contributor Author

lfarv commented Jan 13, 2022

@carmignani : excellent remark. I'll do that.

@simoneliuzzo
Copy link
Contributor

simoneliuzzo commented Jan 14, 2022

may be also the radiation state of the ring could be added to atGetRingParam ?

@simoneliuzzo
Copy link
Contributor

simoneliuzzo commented Jan 14, 2022

and may be atGetRingParam could also store the dp/p and RF shift of the the ring?

@lfarv
Copy link
Contributor Author

lfarv commented Jan 14, 2022

@simoneliuzzo: in principle, I agree.But practically, "RingProperties" is an image of what is stored in the RingParam element. It is difficult to store there information which may be modified without going through atSetRingProperties: the stored information would the become wrong. In your examples, one could imagine that atradon/off would call atSetRingProperties to update the information. For dp/p or RF frequency it's more difficult…
Let's keep this for future.

@lfarv
Copy link
Contributor Author

lfarv commented Jan 14, 2022

The upgrade is now more ambitious: atenergy now calls atGetRingProperties. This eliminates duplicated computations and has some benefits: for voltage and harmonic number, they are no more computed from the 1st cavity, but from the set of cavities with the lowest frequency (considered as "fundamental", even if it's not always true). This choice can be modified by setting the optional "cavpts" ring property.

@lfarv lfarv merged commit 25802a3 into master Jan 19, 2022
@lfarv lfarv deleted the harmnumber_from_atenergy branch January 19, 2022 09:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Matlab For Matlab/Octave AT code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants