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 getleff</title> |
---|
6 | <meta name="keywords" content="getleff"> |
---|
7 | <meta name="description" content="GETLEFF - Returns the magnet length as in the AT deck [meters]"> |
---|
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> > getleff.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>getleff |
---|
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>GETLEFF - Returns the magnet length as in the AT deck [meters]</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 Length = getleff(Family, 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">GETLEFF - Returns the magnet length as in the AT deck [meters] |
---|
31 | Leff = getleff(Family, DeviceList) |
---|
32 | |
---|
33 | INPUTS |
---|
34 | 1. Family = Family Name |
---|
35 | Accelerator Object |
---|
36 | Cell Array of Accelerator Objects or Family Names |
---|
37 | AT FamName |
---|
38 | 2. DeviceList = [Sector Device #] or [element #] list {default or empty list: whole family} |
---|
39 | |
---|
40 | NOTES |
---|
41 | 1. If Family is a cell array, then DeviceList must also be a cell array |
---|
42 | 2. If using AT FamName, then DeviceList is index vector, ie, |
---|
43 | Length = THERING{ATIndexList}.Length(DeviceList) |
---|
44 | |
---|
45 | Written by Greg Portmann</pre></div> |
---|
46 | |
---|
47 | <!-- crossreference --> |
---|
48 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
49 | This function calls: |
---|
50 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
51 | </ul> |
---|
52 | This function is called by: |
---|
53 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
54 | <li><a href="getkleff.html" class="code" title="function [KLeff, K, Leff] = getkleff(Family, varargin);">getkleff</a> GETKLEFF - Returns K * Leff in the AT deck</li><li><a href="modelchrosensitivity.html" class="code" title="function [DSx DSz] = modelchrosensitivity(varargin)">modelchrosensitivity</a> TUNESENSITIVITY - Computes sextupole change for a given dxi</li><li><a href="modeltunesensitivity.html" class="code" title="function [DKx DKz]=modeltunesensitivity(varargin)">modeltunesensitivity</a> TUNESENSITIVITY - Computes quadrupole change for a given dnu</li></ul> |
---|
55 | <!-- crossreference --> |
---|
56 | |
---|
57 | |
---|
58 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
59 | <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function Length = getleff(Family, varargin);</a> |
---|
60 | 0002 <span class="comment">%GETLEFF - Returns the magnet length as in the AT deck [meters]</span> |
---|
61 | 0003 <span class="comment">% Leff = getleff(Family, DeviceList)</span> |
---|
62 | 0004 <span class="comment">%</span> |
---|
63 | 0005 <span class="comment">% INPUTS</span> |
---|
64 | 0006 <span class="comment">% 1. Family = Family Name</span> |
---|
65 | 0007 <span class="comment">% Accelerator Object</span> |
---|
66 | 0008 <span class="comment">% Cell Array of Accelerator Objects or Family Names</span> |
---|
67 | 0009 <span class="comment">% AT FamName</span> |
---|
68 | 0010 <span class="comment">% 2. DeviceList = [Sector Device #] or [element #] list {default or empty list: whole family}</span> |
---|
69 | 0011 <span class="comment">%</span> |
---|
70 | 0012 <span class="comment">% NOTES</span> |
---|
71 | 0013 <span class="comment">% 1. If Family is a cell array, then DeviceList must also be a cell array</span> |
---|
72 | 0014 <span class="comment">% 2. If using AT FamName, then DeviceList is index vector, ie,</span> |
---|
73 | 0015 <span class="comment">% Length = THERING{ATIndexList}.Length(DeviceList)</span> |
---|
74 | 0016 <span class="comment">%</span> |
---|
75 | 0017 <span class="comment">% Written by Greg Portmann</span> |
---|
76 | 0018 |
---|
77 | 0019 <span class="keyword">global</span> THERING |
---|
78 | 0020 |
---|
79 | 0021 <span class="keyword">if</span> nargin == 0, |
---|
80 | 0022 error(<span class="string">'Must have at least one input (Family or Channel Name).'</span>); |
---|
81 | 0023 <span class="keyword">end</span> |
---|
82 | 0024 |
---|
83 | 0025 ATIndexList = getfamilydata(Family, <span class="string">'AT'</span>, <span class="string">'ATIndex'</span>, varargin{:}); |
---|
84 | 0026 |
---|
85 | 0027 <span class="keyword">if</span> isempty(ATIndexList) |
---|
86 | 0028 <span class="comment">% Try an AT family</span> |
---|
87 | 0029 ATIndexList = findcells(THERING, <span class="string">'FamName'</span>, Family); |
---|
88 | 0030 ATIndexList = ATIndexList(:); |
---|
89 | 0031 <span class="keyword">if</span> nargin >= 2 |
---|
90 | 0032 ATIndexList = ATIndexList(varargin{2}); |
---|
91 | 0033 <span class="keyword">end</span> |
---|
92 | 0034 <span class="keyword">end</span> |
---|
93 | 0035 |
---|
94 | 0036 <span class="keyword">for</span> i=1:size(ATIndexList,1) |
---|
95 | 0037 Length(i,1) = 0; |
---|
96 | 0038 <span class="keyword">for</span> j=1:size(ATIndexList,2) |
---|
97 | 0039 Length(i,1) = Length(i,1) + THERING{ATIndexList(i,j)}.Length; |
---|
98 | 0040 <span class="keyword">end</span> |
---|
99 | 0041 <span class="keyword">end</span></pre></div> |
---|
100 | <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> |
---|
101 | </body> |
---|
102 | </html> |
---|