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 modelchrosensitivity</title> |
---|
6 | <meta name="keywords" content="modelchrosensitivity"> |
---|
7 | <meta name="description" content="TUNESENSITIVITY - Computes sextupole change for a given dxi"> |
---|
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">mml</a> > <a href="index.html">at</a> > modelchrosensitivity.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 mml/at <img alt=">" border="0" src="../../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>modelchrosensitivity |
---|
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>TUNESENSITIVITY - Computes sextupole change for a given dxi</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>function [DSx DSz] = modelchrosensitivity(varargin) </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">TUNESENSITIVITY - Computes sextupole change for a given dxi |
---|
31 | |
---|
32 | INPUTS |
---|
33 | 1. dxix - horizontal tune change |
---|
34 | 2. dxiz - vertical tune change |
---|
35 | |
---|
36 | OUTPUTS |
---|
37 | 1. DSx - sextupole change to get dxix |
---|
38 | 2. DSz - sextupole change to get dxiz |
---|
39 | |
---|
40 | See Also <a href="modeltunesensitivity.html" class="code" title="function [DKx DKz]=modeltunesensitivity(varargin)">modeltunesensitivity</a></pre></div> |
---|
41 | |
---|
42 | <!-- crossreference --> |
---|
43 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> |
---|
44 | This function calls: |
---|
45 | <ul style="list-style-image:url(../../matlabicon.gif)"> |
---|
46 | <li><a href="getleff.html" class="code" title="function Length = getleff(Family, varargin);">getleff</a> GETLEFF - Returns the magnet length as in the AT deck [meters]</li><li><a href="modeldisp.html" class="code" title="function [Dx, Dy, Sx, Sy] = modeldisp(varargin)">modeldisp</a> MODELDISP - Returns the dispersion function of the model</li><li><a href="modeltwiss.html" class="code" title="function [TwissX, TwissY, Sx, Sy, Tune] = modeltwiss(varargin)">modeltwiss</a> MODELTWISS - Returns a twiss function of the model</li></ul> |
---|
47 | This function is called by: |
---|
48 | <ul style="list-style-image:url(../../matlabicon.gif)"> |
---|
49 | </ul> |
---|
50 | <!-- crossreference --> |
---|
51 | |
---|
52 | |
---|
53 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> |
---|
54 | <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [DSx DSz] = modelchrosensitivity(varargin)</a> |
---|
55 | 0002 <span class="comment">%TUNESENSITIVITY - Computes sextupole change for a given dxi</span> |
---|
56 | 0003 <span class="comment">%</span> |
---|
57 | 0004 <span class="comment">% INPUTS</span> |
---|
58 | 0005 <span class="comment">% 1. dxix - horizontal tune change</span> |
---|
59 | 0006 <span class="comment">% 2. dxiz - vertical tune change</span> |
---|
60 | 0007 <span class="comment">%</span> |
---|
61 | 0008 <span class="comment">% OUTPUTS</span> |
---|
62 | 0009 <span class="comment">% 1. DSx - sextupole change to get dxix</span> |
---|
63 | 0010 <span class="comment">% 2. DSz - sextupole change to get dxiz</span> |
---|
64 | 0011 <span class="comment">%</span> |
---|
65 | 0012 <span class="comment">% See Also modeltunesensitivity</span> |
---|
66 | 0013 |
---|
67 | 0014 <span class="comment">%</span> |
---|
68 | 0015 <span class="comment">% Written by Laurent S. Nadolski</span> |
---|
69 | 0016 |
---|
70 | 0017 <span class="keyword">if</span> isempty(varargin) |
---|
71 | 0018 dxix = 1e-1; |
---|
72 | 0019 dxiz = 1e-1; |
---|
73 | 0020 <span class="keyword">elseif</span> nvargin == 1 |
---|
74 | 0021 dxix = dxiz; |
---|
75 | 0022 <span class="keyword">end</span> |
---|
76 | 0023 |
---|
77 | 0024 fprintf(<span class="string">'Sextupole change for dxix of %f and dxiz = %f \n'</span>,dxix,dxiz); |
---|
78 | 0025 |
---|
79 | 0026 <span class="comment">% get all sextupoles</span> |
---|
80 | 0027 a = findmemberof(<span class="string">'SEXT'</span>); |
---|
81 | 0028 |
---|
82 | 0029 <span class="keyword">for</span> k = 1:10 |
---|
83 | 0030 |
---|
84 | 0031 Family = a{k}; |
---|
85 | 0032 |
---|
86 | 0033 [bx bz] = <a href="modeltwiss.html" class="code" title="function [TwissX, TwissY, Sx, Sy, Tune] = modeltwiss(varargin)">modeltwiss</a>(<span class="string">'beta'</span>,Family); |
---|
87 | 0034 [etax etaz] = <a href="modeldisp.html" class="code" title="function [Dx, Dy, Sx, Sy] = modeldisp(varargin)">modeldisp</a>(Family); |
---|
88 | 0035 |
---|
89 | 0036 L = <a href="getleff.html" class="code" title="function Length = getleff(Family, varargin);">getleff</a>(Family); |
---|
90 | 0037 NQ = length(getspos(Family)); |
---|
91 | 0038 |
---|
92 | 0039 DSx(k) = 2*pi*dxix/bx(1)/etax(1)/NQ/L(1); |
---|
93 | 0040 DSz(k) = -2*pi*dxiz/bz(1)/etax(1)/NQ/L(1); |
---|
94 | 0041 |
---|
95 | 0042 fprintf(<span class="string">'%s : DSxL = %1.2e DSzL = %1.2e betax = %2.2f m betaz = %2.2f m etax = %2.2f m NQ = %2.0f L= %1.2e m \n'</span>, <span class="keyword">...</span> |
---|
96 | 0043 Family, DSx(k)*L(1), DSz(k)*L(1), bx(1), bz(1), etax(1), NQ, L(1)); |
---|
97 | 0044 <span class="keyword">end</span></pre></div> |
---|
98 | <hr><address>Generated on Mon 21-May-2007 15:29:18 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
99 | </body> |
---|
100 | </html> |
---|