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

IBS Convention Changes #163

Open
wants to merge 53 commits into
base: main
Choose a base branch
from
Open

Conversation

fsoubelet
Copy link
Contributor

Description

This is the second of 3 sibling pull requests enacting the change in IBS convention to return amplitude growth rates for consistency with synchrotron radiation damping times, instead of the current emittance growth rates.

The following changes were made:

  • The returned growth rates are now in amplitude convention. They are computed just like before but converted from emittance to amplitude before returning.
  • The returned object is very explicitely named IBSAmplitudeGrowthRates. An analog IBSEmittanceGrowthRates has been added for the user's comfort in converting.
  • Methods are provided to switch from amplitude to emittance (both ways) and from rates to times.
  • All docstrings, everywhere relevant, have been modified to explicitely specify we are returning amplitude growth rates to the user.
  • All tests have been adapted: the computed growth rates are converted to emittance convention before comparing to MAD-X. Some more documentation has been added at the top of the file.
  • The analytical kick - which builds on growth rates - has been adapted R. Bruce's formalism assumes emittance convention. The computed rates are simply converted to emittance convention and used as previously.
  • The API documentation (public interface) has been adapted to explicitely state we return amplitude growth rates. Also, a previously unallowed option has simply been removed.
  • The examples have been adapted to reflect the new outputs.
  • A new example has been added to showcase the returned convention and how to switch between conventions should the user need to.

REQUIRES xsuite/xtrack#593 TO BE MERGED (as tests use the TwissTable api for clarity).

Checklist

Mandatory:

  • I have added tests to cover my changes
  • All the tests are passing, including my new ones
  • I described my changes in this PR description

Optional:

  • The code I wrote follows good style practices (see PEP 8 and PEP 20).
  • I have updated the docs in relation to my changes, if applicable
  • I have tested also GPU contexts

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant