source: MML/trunk/at/atphysics/mkSRotationMatrix.m @ 4

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: 759 bytes
Line 
1function RM = mkSRotationMatrix(psi);
2%MKSROTATIONMATRIX(PSI) coordinate transformation matrix
3% that describes s-rotation of the ELEMENT
4%
5% |   cos(psi)     0       sin(psi)     0         0       0     |
6% |      0     cos(psi)        0      sin(psi)    0       0     |
7% |  -sin(psi)     0       cos(psi)     0         0       0     |
8% |      0     -sin(psi)       0      cos(psi)    0       0     |
9% |      0         0           0        0         1       0     |
10% |      0         0           0        0         0       1     |
11%
12% Note: AT defines 'positive' s-rotation as clockwise, 
13%       looking in the dirction of the beamm
14%
15
16C = cos(psi);
17S = sin(psi);
18
19RM = diag([ C C C C 1  1 ]);
20RM(1,3) =  S;
21RM(2,4) =  S;
22RM(3,1) = -S;
23RM(4,2) = -S;
Note: See TracBrowser for help on using the repository browser.