source: MML/trunk/mml/at/doc_html/at/solerror.html @ 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: 4.7 KB
Line 
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 &copy; 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> &gt;  <a href="index.html">at</a> &gt; solerror.m</div>
16
17<!--<table width="100%"><tr><td align="left"><a href="../index.html"><img alt="<" border="0" src="../left.png">&nbsp;Master index</a></td>
18<td align="right"><a href="index.html">Index for at&nbsp;<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 --&gt; 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>
40This function calls:
41<ul style="list-style-image:url(../matlabicon.gif)">
42</ul>
43This 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>
510002 <span class="comment">% This is not equivalent to rotating elements</span>
520003 <span class="comment">% For zero closed orbit, there is no effect on closed orbit of</span>
530004 <span class="comment">% 1. rotation around s-axis</span>
540005 <span class="comment">%   One way is just to rotate the element ie the component of the multipole</span>
550006 <span class="comment">%   But special attention has to be watch for 2n poles</span>
560007 <span class="comment">% 2. s-displacement --&gt; in reality it is equivalent to a orbit kick</span>
570008
580009 <span class="keyword">global</span> THERING;
590010
600011 ATind = atindex(THERING);
610012
620013 <span class="comment">% Dipoles</span>
630014 sigmaDs = 500e-6; <span class="comment">% meter</span>
640015 sigmaDx = 500e-6; <span class="comment">% meter</span>
650016 sigmaDz = 000e-6; <span class="comment">% meter</span>
660017 sigmaRs = 200e-6; <span class="comment">% meter</span>
670018
680019 Index = ATind.BEND;
690020
700021 sigmaDx = sigmaDx*randn(size(Index));
710022 sigmaDz = sigmaDz*randn(size(Index));
720023 sigmaDs = sigmaDs*randn(size(Index));
730024 sigmaRs = sigmaRs*randn(size(Index));
740025
750026 mvelem(Index,sigmaDs);
760027 setshift(Index, sigmaDx, sigmaDz);
770028
780029 <span class="comment">%settilt(Index, sigmaRs);</span>
790030 <span class="comment">% Rotation of the dipole fields</span>
800031 Theta = THERING{Index(1)}.BendingAngle*/getbrho;
810032
820033 <span class="comment">% for ik = 1:length(Index)</span>
830034 <span class="comment">%     THERING{Index(ik)}.PolynomeA(1) = sin(sigmaRs(ik))*</span>
840035 <span class="comment">% end</span>
850036
860037 <span class="comment">% Quadrupoles</span>
870038
880039 sigmaDx = 100e-6; <span class="comment">% meter</span>
890040 sigmaDz = 100e-6; <span class="comment">% meter</span>
900041
910042 Index = [ATind.Q1, ATind.Q2, ATind.Q3, ATind.Q4, ATind.Q5 <span class="keyword">...</span>
920043          ATind.Q6, ATind.Q7, ATind.Q8, ATind.Q9, ATind.Q10];
930044
940045 sigmaDx = sigmaDx*randn(size(Index));
950046 sigmaDz = sigmaDz*randn(size(Index));
960047
970048       
980049 setshift(Index, sigmaDx, sigmaDz);
990050
1000051 <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> &copy; 2003</address>
102</body>
103</html>
Note: See TracBrowser for help on using the repository browser.