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

Introduce an RF frequency shift input to specify off-momentum computation #505

Merged
merged 6 commits into from
Oct 28, 2022

Conversation

lfarv
Copy link
Contributor

@lfarv lfarv commented Oct 23, 2022

Wherever there is an input for dp or dct to specify off-momentum computation, we can now alternatively use df, the RF frequency deviation from nominal. This off-momentum specification is closer to the way it is obtained in a real machine. So we can use one of these 3 keywords:

  • dp=* (off-momentum)
  • dct=* (path lengthening)
  • df=* (RF frequency shift)

This is similar to what #501 introduced for Matlab

The following functions are modified to introduce the df keyword:

  • find_orbit4, find_syncorbit, find_orbit
  • find_m44
  • get_revolution_frequency
  • linopt2, linopt4, linopt6, get_optics, avlinopt
  • get_tune, get_chrom

As a side effect, this PR also introduces new properties for the lattice object:

  • cell_length
  • cell_revolution_frequency
  • cell_harmnumber

They are the 1-cell equivalent of the unchanged following properties related to the full ring (periodicity x cells):

  • circumference
  • revolution_frequency
  • harmonic_number

@lfarv lfarv added enhancement Python For python AT code labels Oct 23, 2022
@lfarv lfarv requested a review from swhite2401 October 23, 2022 14:26
@swhite2401
Copy link
Contributor

Very useful, would it make sense to issue an error if 2 contradicting argument are provided. I saw you mention in the help that dct and df overwrite dp but is that sufficient?

@lfarv
Copy link
Contributor Author

lfarv commented Oct 27, 2022

@swhite2401 : the test is added

@lfarv lfarv merged commit 0eebb34 into master Oct 28, 2022
@lfarv lfarv deleted the df_input_python branch October 28, 2022 10:50
@lfarv lfarv mentioned this pull request Jun 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Python For python AT code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants