Open rdemaria opened 3 months ago
I have given it a try with MAD-NG, and from the point of view of MAD-X, the problem doesn't matter because MAD-X never looks "inside" elements, but from the point of view of Survey, I confirm the issue.
local survey, sequence in MAD
local sbend, quadrupole in MAD.element
local pi in MAD.constant
local mb = sbend 'MB' { l=1, angle=pi/2 }
local mq = quadrupole 'MQ' { l=1, k1=0 }
local ss = sequence 'SS' { l=10,
mq 'mq.1' { at=1, misalign={dphi=0.3} },
mb 'mb' { at=2 },
mq 'mq.2' { at=3, misalign={dphi=0.3} },
}
survey { sequence=ss, misalign=true, save='atenbeex' }
:remove \row -> row.kind == "drift" :write "survey.tfs"
The slice numbers (column slc
) in the survey table below have the following meaning: P = patch, F=fringe, B=body (not selected by atenbeex = at_entry_begin_end_exit
)
-1 -3 0 1 -4 -2
+---+---+-----+---+---+
| P | F | B | F | P |
+---+---+-----+---+---+
@ name %02s "SS"
@ type %06s "survey"
@ title %08s "no-title"
@ origin %16s "MAD 0.9.9 OSX 64"
@ date %08s "27/06/24"
@ time %08s "14:40:59"
@ refcol %04s "name"
@ direction %le 1
@ observe %le 0
@ implicit %b false
@ misalign %b true
* name kind s l angle tilt x y z theta phi psi slc
$ %s %s %le %le %le %le %le %le %le %le %le %le %le
"$start" "marker" 0 0 0 0 0 0 0 0 0 0 -1
"$start" "marker" 0 0 0 0 0 0 0 0 0 0 -2
"mq.1" "quadrupole" 0.5 0 0 0 0 0 0.5 0 0 0 -1
"mq.1" "quadrupole" 0.5 0 0 0 0 0 0.5 0 0.3 0 -3
"mq.1" "quadrupole" 1.5 1 0 0 0 0.2955202067 1.455336489 0 0.3 0 -4
"mq.1" "quadrupole" 1.5 1 0 0 0 0 1.5 0 0 0 -2
"mb" "sbend" 1.5 0 0 0 0 0 1.5 0 0 0 -1
"mb" "sbend" 1.5 0 0 0 0 0 1.5 0 0 0 -3
"mb" "sbend" 2.5 1 1.570796327 0 -0.6366197724 0 2.136619772 -1.570796327 0 0 -4
"mb" "sbend" 2.5 1 1.570796327 0 -0.6366197724 0 2.136619772 -1.570796327 0 0 -2
"mq.2" "quadrupole" 2.5 0 0 0 -0.6366197724 0 2.136619772 -1.570796327 0 0 -1
"mq.2" "quadrupole" 2.5 0 0 0 -0.6366197724 0 2.136619772 -1.570796327 0.3 0 -3
"mq.2" "quadrupole" 3.5 1 0 0 -1.591956261 0.2955202067 2.136619772 -1.570796327 0.3 0 -4
"mq.2" "quadrupole" 3.5 1 0 0 -1.636619772 0 2.136619772 -1.570796327 0 0 -2
"$end" "marker" 10 0 0 0 -8.136619772 0 2.136619772 -1.570796327 0 0 -1
"$end" "marker" 10 0 0 0 -8.136619772 0 2.136619772 -1.570796327 0 0 -2
This example shows:
That the first dphi correctly gives an elevation angle, while the second dphi, transform in dpsi giving a tilt!
The code in this location is: