Open DavidSagan opened 1 week ago
What is aperture
doing? calculating the dynamic aperture?
No. This is a calculation of whether a particle has hit an aperture. This function will potentially be called for each lattice element during tracking.
Ah, ok. One idea I have is that for elements that have an aperture specified, the low-level tracking lattice that we produce inserts an aperture
element after said elements and checks the particle coordinates. This is the simplest and most elegant way in my opinion, however this would of course not work in the case when an aperture is reached internally before finishing traversal of the element.
The case where there are apertures that are not at an element end are a special case which I don't think we need to worry about just now.
Then I think, just as all misalignments would be patches at the lower-level, all apertures would be aperture elements placed after each element at the low-level. Then when you have a Vector{LowLevelEle}
it is handled automatically by the MD
Yes this sounds reasonable but an API is still needed.
Note: An element will have a misalignment_moves_aperture
bool that with determine the relative order of the patches with respect to the aperture checking.
Generally the different tracking methods will be using the same aperture function(s) so there needs to be a standardized API for this. Something like:
Another issue is in what package the
aperture
funciton should live. Putting it inBeamTracking.jl
would tie the aperture calculation to the element tracking which makes things less flexible.