Open ChristopherMayes opened 4 months ago
Under what conditions is it legal to set the Twiss in the middle of a lattice?
Shouldn't it be possible for any open lattice?
No since the Twiss at any point in the lattice is determined by propagating the Twiss from the beginning. This is true for both open and closed lattices. It is just that the Twiss at the beginning is determined differently for open and closed lattices.
The command should take the twiss as the user defined, propagate it backwards to the beginning, and then propagate forward through the lattice (as usual).
This will take some development... And will have to be address mode flip issues.
Currently the user can set the beginning element Twiss via a command like
set ele beginning beta_a = 1.2345
. However, it is often needed to set the Twiss in the middle of a lattice. Rather that rely on the Tao optimizer, I would like to have a command to do this by efficiently propagating the twiss backwards then forwards. This should allow multiple items to be set at once, including coupling terms. For example: