-
Notifications
You must be signed in to change notification settings - Fork 36
Add feedback passmethod #983
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
base: master
Are you sure you want to change the base?
Conversation
| Elem->GZ=GZ; | ||
| Elem->closed_orbit = closed_orbit; | ||
| } | ||
| FeedbackPass(r_in,num_particles,Elem); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think in other element we pass num_particles as the last argument but this is cosmetic
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I put here follows what is in BeamMomentsPass and SliceMomentsPass.
|
ready for re-review |
| name: str = "", | ||
| particle: str | Particle = "relativistic", | ||
| TimeLag: float | Sequence[float] = 0.0 | ||
| TimeLag: float | Sequence[float] = 0.0, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't is possible to generate a simple ring from just an AT lattice?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, that is typically what fast_ring is for. Simple_ring is more for inputs by hand. But you are right i could pass a lattice and make an even simpler fast_ring from a lattice. That is separate to this though.
|
ready for re-re-review |
|
Please re-approve. I made a last check of my script and realised I had forgotten to change the GX->Gx in the C, as it is optional it was not doing any damping! |
Could you please add unit tests first? Thanks! |

Adding a simple passmethod to compute the mean position of the full beam and feedback with a gain.
The feedback takes simply a gain in x,y, and z, and an optional closed_orbit array (6d).
In this module, a closed_orbit is needed to make sure that the feedback is working. But this does not dictate what the closed_orbit is. To account for this, I added the orbit6 into
at.simple_ringto allow an appropriate closed_orbit to feedback to to check that it is working.Tested with mpi and without, all working fine.
Below is an example script.