i am in the planning phase of a complex 3d transfer line with multiple different tilts.
The rotate element looks pretty neat and usefull for me, unfortunately i came across a nasty bug:
It rotates the twiss parameter as it should after the description IF it tilts around n times pi/2 .
For any other angle it does not seem to have any influence at all.
I didn't check the behaviour on tracked particles yet, further it works fine for the view3dgeometry tool.
If i apply the TILT parameter to each single element it works fine.
A small example follows.
If the ROTATE element would work correct, the two plots "test_rot" and "test_tilt" should look the same.
I am using elegant 34.4.1
Thanks already
![Smile :)](./images/smilies/icon_e_smile.gif)
####################
test.lte:
D: DRIF,L=1
B: RBEND, L=0.50, ANGLE=0.1
B_TILT: RBEND, L=0.50, ANGLE=0.1, TILT=0.5
ROT1: ROTATE,TILT=0.5
ROT2: ROTATE,TILT=-0.5
TEST: LINE=(D,B)
TEST_ROT: LINE=(D,ROT1,B,ROT2)
TEST_TILT: LINE=(D,B_TILT)
####################
run.ele:
&run_setup
lattice = test.lte
use_beamline = <line>
p_central_mev = 50
magnets=<line>.mg
&end
&run_control
&end
&twiss_output
matched=0
filename = <line>.twi
&end
#####################
run file:
#!/bin/bash
function plt {
sddsplot -graph=line,vary -title="$1" -unsup=y \
-column=s,eta? -yscale=id=1 $1.twi -legend \
-column=s,beta? -yscale=id=2 $1.twi -legend \
-column=s,Profile -overlay=xmode=norm,yfact=0.04 \
-graph=line,type=0 $1.mg
}
elegant run.ele -macro=line=test
plt test
elegant run.ele -macro=line=test_rot
plt test_rot
elegant run.ele -macro=line=test_tilt
plt test_tilt
rm *.twi *.mg