Nonlinear Correction calculation in the IRs

Performs local correction of the Resonance Driving Terms (RDTs) in the Insertion Regions (IRs) based on the principle described in [BruningDynamicApertureStudies2004] with the addition of correcting feed-down and using feed-down to correct lower order RDTs. Details can be found in [DillyNonlinearIRCorrections2023] .

Todo

  • [easy] Allow for more than two optics given (e.g. find corrections for 15cm and 30cm for both beams)

  • [medium] Maybe sort RDTs by highest corrector instead of highest RDT order? This should allow for correctors that correct via feed-down to be assigned before lower order RDTs are calculated. Might cause other problems, though. To be thought about.

  • [medium] Consider switching the signs all into the reference frame of Beam 1. That means X, DX and anti-mirror-KN(S)L twiss and errors from Beam 4, and the anti-mirror-KN(S)L twiss from Beam 2. That should in principle allow to ignore all other beam-related sign switches. BUT: does this really work with all the feed-down options implemented (i.e. feed-down to RDT, feed-down from correctors)? It should, but needs to be checked and tested.

  • [medium] Take phase advance between the elements and to the correction point at the entrance of the IR into account. That would mean correct the numerator of the actual RDT.

  • [hard] Additionally to taking the phase-advance into account, one might try to optimize the actual RDTs at the position of the correctors. This might be very problematic, as we have two correctors (one on each side) per order, so that might become a non-linear problem (as now there are now two equations, one per corrector, which are non-linearly dependent.)

References

[BruningDynamicApertureStudies2004]

O. Bruening et al., Dynamic aperture studies for the LHC separation dipoles. (2004) https://cds.cern.ch/record/742967

[DillyNonlinearIRCorrections2023]

J. Dilly et R. Tomás, A flexible nonlinear Resonance Driving Term based Correction Algorithm with feed-down. (2023) https://github.com/pylhc/irnl_rdt_correction/blob/master/latex/note.pdf

author: Joschua Dilly