1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" |
---|
2 | "http://www.w3.org/TR/REC-html40/loose.dtd"> |
---|
3 | <html> |
---|
4 | <head> |
---|
5 | <title>Description of solerror</title> |
---|
6 | <meta name="keywords" content="solerror"> |
---|
7 | <meta name="description" content="% In Tracy or AT for rotation, the beam is rotated and not the element"> |
---|
8 | <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> |
---|
9 | <meta name="generator" content="m2html © 2003 Guillaume Flandin"> |
---|
10 | <meta name="robots" content="index, follow"> |
---|
11 | <link type="text/css" rel="stylesheet" href="../m2html.css"> |
---|
12 | </head> |
---|
13 | <body> |
---|
14 | <a name="_top"></a> |
---|
15 | <div><a href="../index.html">Home</a> > <a href="index.html">at</a> > solerror.m</div> |
---|
16 | |
---|
17 | <!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png"> Master index</a></td> |
---|
18 | <td align="right"><a href="index.html">Index for at <img alt=">" border="0" src="../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>solerror |
---|
21 | </h1> |
---|
22 | |
---|
23 | <h2><a name="_name"></a>PURPOSE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
24 | <div class="box"><strong>% In Tracy or AT for rotation, the beam is rotated and not the element</strong></div> |
---|
25 | |
---|
26 | <h2><a name="_synopsis"></a>SYNOPSIS <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
27 | <div class="box"><strong>This is a script file. </strong></div> |
---|
28 | |
---|
29 | <h2><a name="_description"></a>DESCRIPTION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
30 | <div class="fragment"><pre class="comment">% In Tracy or AT for rotation, the beam is rotated and not the element |
---|
31 | This is not equivalent to rotating elements |
---|
32 | For zero closed orbit, there is no effect on closed orbit of |
---|
33 | 1. rotation around s-axis |
---|
34 | One way is just to rotate the element ie the component of the multipole |
---|
35 | But special attention has to be watch for 2n poles |
---|
36 | 2. s-displacement --> in reality it is equivalent to a orbit kick</pre></div> |
---|
37 | |
---|
38 | <!-- crossreference --> |
---|
39 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
40 | This function calls: |
---|
41 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
42 | </ul> |
---|
43 | This function is called by: |
---|
44 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
45 | </ul> |
---|
46 | <!-- crossreference --> |
---|
47 | |
---|
48 | |
---|
49 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
50 | <div class="fragment"><pre>0001 <span class="comment">%% In Tracy or AT for rotation, the beam is rotated and not the element</span> |
---|
51 | 0002 <span class="comment">% This is not equivalent to rotating elements</span> |
---|
52 | 0003 <span class="comment">% For zero closed orbit, there is no effect on closed orbit of</span> |
---|
53 | 0004 <span class="comment">% 1. rotation around s-axis</span> |
---|
54 | 0005 <span class="comment">% One way is just to rotate the element ie the component of the multipole</span> |
---|
55 | 0006 <span class="comment">% But special attention has to be watch for 2n poles</span> |
---|
56 | 0007 <span class="comment">% 2. s-displacement --> in reality it is equivalent to a orbit kick</span> |
---|
57 | 0008 |
---|
58 | 0009 <span class="keyword">global</span> THERING; |
---|
59 | 0010 |
---|
60 | 0011 ATind = atindex(THERING); |
---|
61 | 0012 |
---|
62 | 0013 <span class="comment">% Dipoles</span> |
---|
63 | 0014 sigmaDs = 500e-6; <span class="comment">% meter</span> |
---|
64 | 0015 sigmaDx = 500e-6; <span class="comment">% meter</span> |
---|
65 | 0016 sigmaDz = 000e-6; <span class="comment">% meter</span> |
---|
66 | 0017 sigmaRs = 200e-6; <span class="comment">% meter</span> |
---|
67 | 0018 |
---|
68 | 0019 Index = ATind.BEND; |
---|
69 | 0020 |
---|
70 | 0021 sigmaDx = sigmaDx*randn(size(Index)); |
---|
71 | 0022 sigmaDz = sigmaDz*randn(size(Index)); |
---|
72 | 0023 sigmaDs = sigmaDs*randn(size(Index)); |
---|
73 | 0024 sigmaRs = sigmaRs*randn(size(Index)); |
---|
74 | 0025 |
---|
75 | 0026 mvelem(Index,sigmaDs); |
---|
76 | 0027 setshift(Index, sigmaDx, sigmaDz); |
---|
77 | 0028 |
---|
78 | 0029 <span class="comment">%settilt(Index, sigmaRs);</span> |
---|
79 | 0030 <span class="comment">% Rotation of the dipole fields</span> |
---|
80 | 0031 Theta = THERING{Index(1)}.BendingAngle*/getbrho; |
---|
81 | 0032 |
---|
82 | 0033 <span class="comment">% for ik = 1:length(Index)</span> |
---|
83 | 0034 <span class="comment">% THERING{Index(ik)}.PolynomeA(1) = sin(sigmaRs(ik))*</span> |
---|
84 | 0035 <span class="comment">% end</span> |
---|
85 | 0036 |
---|
86 | 0037 <span class="comment">% Quadrupoles</span> |
---|
87 | 0038 |
---|
88 | 0039 sigmaDx = 100e-6; <span class="comment">% meter</span> |
---|
89 | 0040 sigmaDz = 100e-6; <span class="comment">% meter</span> |
---|
90 | 0041 |
---|
91 | 0042 Index = [ATind.Q1, ATind.Q2, ATind.Q3, ATind.Q4, ATind.Q5 <span class="keyword">...</span> |
---|
92 | 0043 ATind.Q6, ATind.Q7, ATind.Q8, ATind.Q9, ATind.Q10]; |
---|
93 | 0044 |
---|
94 | 0045 sigmaDx = sigmaDx*randn(size(Index)); |
---|
95 | 0046 sigmaDz = sigmaDz*randn(size(Index)); |
---|
96 | 0047 |
---|
97 | 0048 |
---|
98 | 0049 setshift(Index, sigmaDx, sigmaDz); |
---|
99 | 0050 |
---|
100 | 0051 <span class="comment">% Sextupoles</span></pre></div> |
---|
101 | <hr><address>Generated on Fri 18-May-2007 17:13:39 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
102 | </body> |
---|
103 | </html> |
---|