source: MML/trunk/mml/doc_html/mml/at/modelchrosensitivity.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: 5.4 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 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 &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">mml</a> &gt; <a href="index.html">at</a> &gt; modelchrosensitivity.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 mml/at&nbsp;<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>
44This 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>
47This 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>
550002 <span class="comment">%TUNESENSITIVITY - Computes sextupole change for a given dxi</span>
560003 <span class="comment">%</span>
570004 <span class="comment">%  INPUTS</span>
580005 <span class="comment">%  1. dxix - horizontal tune change</span>
590006 <span class="comment">%  2. dxiz - vertical tune change</span>
600007 <span class="comment">%</span>
610008 <span class="comment">%  OUTPUTS</span>
620009 <span class="comment">%  1. DSx - sextupole change to get dxix</span>
630010 <span class="comment">%  2. DSz - sextupole change to get dxiz</span>
640011 <span class="comment">%</span>
650012 <span class="comment">%  See Also modeltunesensitivity</span>
660013
670014 <span class="comment">%</span>
680015 <span class="comment">%  Written by Laurent S. Nadolski</span>
690016
700017 <span class="keyword">if</span> isempty(varargin)
710018     dxix = 1e-1;
720019     dxiz = 1e-1;
730020 <span class="keyword">elseif</span> nvargin == 1
740021     dxix = dxiz;
750022 <span class="keyword">end</span>
760023
770024 fprintf(<span class="string">'Sextupole change for dxix of %f and dxiz = %f \n'</span>,dxix,dxiz);
780025
790026 <span class="comment">% get all sextupoles</span>
800027 a = findmemberof(<span class="string">'SEXT'</span>);
810028
820029 <span class="keyword">for</span> k = 1:10
830030
840031     Family = a{k};
850032
860033     [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);
870034     [etax etaz] = <a href="modeldisp.html" class="code" title="function [Dx, Dy, Sx, Sy] = modeldisp(varargin)">modeldisp</a>(Family);
880035
890036     L = <a href="getleff.html" class="code" title="function Length = getleff(Family, varargin);">getleff</a>(Family);
900037     NQ = length(getspos(Family));
910038
920039     DSx(k) =  2*pi*dxix/bx(1)/etax(1)/NQ/L(1);
930040     DSz(k) = -2*pi*dxiz/bz(1)/etax(1)/NQ/L(1);
940041
950042     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>
960043         Family, DSx(k)*L(1), DSz(k)*L(1), bx(1), bz(1), etax(1), NQ, L(1));
970044 <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> &copy; 2003</address>
99</body>
100</html>
Note: See TracBrowser for help on using the repository browser.