Laurent Deniau
Laurent Deniau
I have tried to run the debugger at the entry of a function with the given name, using the following (slow) code. This works with `debug.debug()` but not with `dbg()`....
In twiss for the SBEND I found around line 3919 the following equation in the radiation (hx**2 + hy**2) * (one + h*x) The factor (one + h*x) = h*(rho+x)...
First, the alpha functions should not be scaled by `onedp` here: https://github.com/MethodicalAcceleratorDesign/MAD-X/blob/88211ac4a0022d29b24a64374592fb72cadc72cf/src/madx_ptc_twiss.f90#L2179 Second, the algebra is wrong here: https://github.com/MethodicalAcceleratorDesign/MAD-X/blob/88211ac4a0022d29b24a64374592fb72cadc72cf/src/madx_ptc_twiss.f90#L2215 ``` cosvp = (ax*ay-bx*cy)/(ay*ay+cy*cy) ! ok sinvp = (ax*cy+ay*bx)/(ay*ay+cy*cy) ! ok...
These RDTs are computed there: https://github.com/MethodicalAcceleratorDesign/MAD-X/blob/88211ac4a0022d29b24a64374592fb72cadc72cf/src/twiss.f90#L2524 And it would be useful to have them in the twiss table for coupling calculation... Alternatively, it would be more MAD-X oriented to save...
I suspect that pt is not updated properly in Track... ``` x0 = 0.002; px0=-0.001; !el: sbend, l=1, angle=6.3e-4, e1=0.1, e2=0.1; el: quadrupole, l=1, k1=0.2; ss: sequence, l=1; el, at=0.5;...
In file Sh_def_kind.f90, set the global-to-module variable n_wedge = 0 instead of 5, this will save 5*(8+7)*2 = 150 yrotation done for each element
Don't you think that these two tests should be the same? https://github.com/MethodicalAcceleratorDesign/MAD-X/blob/ec7ceb14d6c5df52556539de1621d1c767b3e70e/src/madx_ptc_twiss.f90#L1327 https://github.com/MethodicalAcceleratorDesign/MAD-X/blob/ec7ceb14d6c5df52556539de1621d1c767b3e70e/src/madx_ptc_twiss.f90#L1542 Found it while fixing another problem concerning this piece of code with PR #1154
The Changeref element is not connected while all sub-patches required for its implementation are there. Twiss has a guard emitting a warning, but not Track nor Survey. We should maybe...