Last change
on this file since 4 was
4,
checked in by zhangj, 10 years ago
|
Initial import--MML version from SOLEIL@2013
|
File size:
984 bytes
|
Rev | Line | |
---|
[4] | 1 | function R = mksrollmat(PSI); |
---|
| 2 | %MKSROLLMAT - rotation matrix around s-axis |
---|
| 3 | % M = MKSROLLMAT(PSI)makes a 6-by-6 coordinate transformation matrix |
---|
| 4 | % that transforms 6-by-1 phase space coordinate vector of the PARTICLE |
---|
| 5 | % to a new coord system. |
---|
| 6 | % The new system is rotated around the s-axis |
---|
| 7 | % with respect to the old system by an angle PSI |
---|
| 8 | % POSITIVE PSI corresponds to a CORKSCREW (right) |
---|
| 9 | % rotation of the ELEMENT. |
---|
| 10 | % |
---|
| 11 | % The matrix only transforms the transverse (X,PX,Y,PY) coordinates |
---|
| 12 | % |
---|
| 13 | % In AT, this matrix is used for R1,R2 field of the element |
---|
| 14 | % data structure in a lattice. Some pass-methods use them |
---|
| 15 | % along with T1 and T2 to includ ELEMENT misalignment |
---|
| 16 | % If a straight ELEMENT (such a quadrupole) is rotated |
---|
| 17 | % by a positive angle PSI (ANTICLOCKWISE) then |
---|
| 18 | % R1 = mksrollmat(PSI) |
---|
| 19 | % R2 = mksrollmat(-PSI) |
---|
| 20 | % clockwise (corkscrew aligned with the reference orbit direction) |
---|
| 21 | C = cos(PSI); |
---|
| 22 | S = sin(PSI); |
---|
| 23 | R = diag([ C C C C 1 1 ]); |
---|
| 24 | R(1,3) = S; |
---|
| 25 | R(2,4) = S; |
---|
| 26 | R(3,1) = -S; |
---|
| 27 | R(4,2) = -S; |
---|
Note: See
TracBrowser
for help on using the repository browser.