-
Notifications
You must be signed in to change notification settings - Fork 17
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
Change Cheetah particle coordinate to Canonical variables #163
Conversation
Update docstrings accordingly Update tests Add convenient properties `energies` and `momenta` in `ParticleBeam` class Add convenient property `p0c` in `Beam` class
A question and a comment, Q: the beam coordinate properties all have "s" appended to their names ie. "xs", "xps", is it possible to remove the "s"? Comment: instead of using Tau I would suggest using "z" instead to abide by Bmad convention https://www.classe.cornell.edu/bmad/manual.html. We can discuss during our meeting tomorrow |
|
|
@cr-xu that last commit means this is now properly ready for review and merging, right? |
I was just resolving merge conflicts. Now it should be ready for review. |
Co-authored-by: Jan Kaiser <jan.kaiser@desy.de>
Description
Rename coordinate
s
totau
To avoid confusion and make space for the variable
s
denoting the position of reference particle along a beamline,the 5-th component of the particle phase space coordinate is renamed to
tau
.Rename
xp, yp
topx, py
to be consistent with other codesRemove trailing
s
in retrieving phase space coordinates fromParticleBeam
Change the documentations to explicitly state that Cheetah is using the canonical phase space coordinates$(x,px,y,py,\tau,\delta)$
This is merely a documentation change at this point becasue all the calculations are valid. The conversions from/to ASTRA and OCELOT are indeed done in the correct way.
There is now a new page documenting the coordinate system in readthedocs: https://cheetah-accelerator--163.org.readthedocs.build/en/163/coordinate_system.html
Also: Fixes #162 and other places where
dtype
is listed as parameter but not actually used.Motivation and Context
Types of changes
Checklist
flake8
(required).pytest
tests pass (required).pytest
on a machine with a CUDA GPU and made sure all tests pass (required).Note: We are using a maximum length of 88 characters per line