Conversation
| Elem->GZ=GZ; | ||
| Elem->closed_orbit = closed_orbit; | ||
| } | ||
| FeedbackPass(r_in,num_particles,Elem); |
There was a problem hiding this comment.
I think in other element we pass num_particles as the last argument but this is cosmetic
There was a problem hiding this comment.
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.
Isn't is possible to generate a simple ring from just an AT lattice?
There was a problem hiding this comment.
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! |
|
I added an optional rolling buffer for each plane. Can be used by specifying bufferlength_x/y/z. Then the mean for each turn is added to the buffer and the loop uses the mean of the buffer instead of the one turn mean. Some points/questions I want to make/ask:
|

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.