Describe the bug
If the beam size of the beam is larger than the undulator period, then the extrapolation of aw for transverse position can easily get values which are large enough to cause a full deflection of the beam. This can be avoided by a careful setup of the lattice file with focusing but it should be catched.
To Reproduce
In the benchmark file Aramis.lat, set gamma_ref to 11.3 and xlamdref to 1e-4.
Run the input deck
Expected behavior
the natural focusing is so strong in y so that the F quadrupole blows up the beam size in y to more than 6 mm with some particle larger than 1 cm. Compared to 15 mm period length, this causes an enhancement of aw by a factor of 9!
Additional context
In older version of Genesis a particle beyond a certain off-axis position (at that time the grid) were marked lost and not further calculated. This was revoke to calculate tilted beams without filling out a large grid. However the check can be done quite efficiently when calculating awloc = undulator->faw(x,y) in BeamSolver to allow only an enhancement of faw by not more than 10%.
Describe the bug If the beam size of the beam is larger than the undulator period, then the extrapolation of aw for transverse position can easily get values which are large enough to cause a full deflection of the beam. This can be avoided by a careful setup of the lattice file with focusing but it should be catched.
To Reproduce
Expected behavior the natural focusing is so strong in y so that the F quadrupole blows up the beam size in y to more than 6 mm with some particle larger than 1 cm. Compared to 15 mm period length, this causes an enhancement of aw by a factor of 9!
Additional context In older version of Genesis a particle beyond a certain off-axis position (at that time the grid) were marked lost and not further calculated. This was revoke to calculate tilted beams without filling out a large grid. However the check can be done quite efficiently when calculating awloc = undulator->faw(x,y) in BeamSolver to allow only an enhancement of faw by not more than 10%.