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 getdcct</title> |
---|
6 | <meta name="keywords" content="getdcct"> |
---|
7 | <meta name="description" content="GETDCCT - returns the beam current"> |
---|
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> > getdcct.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 <img alt=">" border="0" src="../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>getdcct |
---|
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>GETDCCT - returns the beam current</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 [DCCT, tout, DataTime, ErrorFlag] = getdcct(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">GETDCCT - returns the beam current |
---|
31 | [DCCT, tout, DataTime, ErrorFlag] = getdcct(t, InputFlags) |
---|
32 | |
---|
33 | OUTPUTS |
---|
34 | 1. DCCT = storage ring electron beam current |
---|
35 | |
---|
36 | INPUTS |
---|
37 | 1. 'Struct' will return a data structure |
---|
38 | 'Numeric' will return numeric outputs {Defaul} |
---|
39 | 2. 'Physics' - Use physics units (optional override of units) |
---|
40 | 'Hardware' - Use hardware units (optional override of units) |
---|
41 | 3. 'Online' - Get data online (optional override of the mode) |
---|
42 | 'Model' - Get data from the model (optional override of the mode) |
---|
43 | 'Manual' - Get data manually (optional override of the mode) |
---|
44 | |
---|
45 | NOTE |
---|
46 | 1. Simulation mode: lifetime is 6 hour, refill at midnight to 1000 mamps |
---|
47 | 2. This function is just an alias for getam('DCCT', ...) |
---|
48 | |
---|
49 | Written by Greg Portmann</pre></div> |
---|
50 | |
---|
51 | <!-- crossreference --> |
---|
52 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
53 | This function calls: |
---|
54 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
55 | <li><a href="getpv.html" class="code" title="function [AM, tout, DataTime, ErrorFlag] = getpv(varargin)">getpv</a> GETPV - Returns a variable from the online system or the model</li><li><a href="isfamily.html" class="code" title="function [FamilyFlag, AO] = isfamily(Family, Field)">isfamily</a> ISFAMILY - True for family names</li></ul> |
---|
56 | This function is called by: |
---|
57 | <ul style="list-style-image:url(../matlabicon.gif)"> |
---|
58 | <li><a href="measchroresp.html" class="code" title="function [Rmat, OutputFileName] = measchroresp(varargin)">measchroresp</a> MEASCHRORESP - measures the response from sextupoles to chromaticity</li><li><a href="meascmhysteresis.html" class="code" title="function meascmhysteresis(BPMList, CMFamily, CMList, MaxChange, NSteps)">meascmhysteresis</a> MEASCMHYSTERESIS - Measure corrector magnet hysteresis</li><li><a href="measdispresp.html" class="code" title="function [D] = measdispresp(CMfamily, CMlist);">measdispresp</a> MEASDISPRESP - Measures Amman TERMs in response matrix</li><li><a href="measlifetime.html" class="code" title="function [Tau, I0, t, DCCT, chi2n] = measlifetime(varargin)">measlifetime</a> MEASLIFETIME - Measures the lifetime using an exponential or linear least squares fit to beam current</li><li><a href="measlocodata.html" class="code" title="function measlocodata(varargin)">measlocodata</a> MEASLOCODATA - Measures a set of LOCO data</li><li><a href="measrespmat.html" class="code" title="function S = measrespmat(varargin)">measrespmat</a> MEASRESPMAT - Measure a response matrix</li><li><a href="quadcenter.html" class="code" title="function [QMS1, QMS2] = quadcenter(QuadFamily, QuadDev, XYPlane, FigureHandle)">quadcenter</a> QUADCENTER - Measure the magnet center of a quadrupole magnet</li><li><a href="setorbit.html" class="code" title="function [OCS, OCS0, V, S, ErrorFlag] = setorbit(varargin)">setorbit</a> SETORBIT - Orbit correction function</li></ul> |
---|
59 | <!-- crossreference --> |
---|
60 | |
---|
61 | |
---|
62 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../up.png"></a></h2> |
---|
63 | <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function [DCCT, tout, DataTime, ErrorFlag] = getdcct(varargin)</a> |
---|
64 | 0002 <span class="comment">%GETDCCT - returns the beam current</span> |
---|
65 | 0003 <span class="comment">% [DCCT, tout, DataTime, ErrorFlag] = getdcct(t, InputFlags)</span> |
---|
66 | 0004 <span class="comment">%</span> |
---|
67 | 0005 <span class="comment">% OUTPUTS</span> |
---|
68 | 0006 <span class="comment">% 1. DCCT = storage ring electron beam current</span> |
---|
69 | 0007 <span class="comment">%</span> |
---|
70 | 0008 <span class="comment">% INPUTS</span> |
---|
71 | 0009 <span class="comment">% 1. 'Struct' will return a data structure</span> |
---|
72 | 0010 <span class="comment">% 'Numeric' will return numeric outputs {Defaul}</span> |
---|
73 | 0011 <span class="comment">% 2. 'Physics' - Use physics units (optional override of units)</span> |
---|
74 | 0012 <span class="comment">% 'Hardware' - Use hardware units (optional override of units)</span> |
---|
75 | 0013 <span class="comment">% 3. 'Online' - Get data online (optional override of the mode)</span> |
---|
76 | 0014 <span class="comment">% 'Model' - Get data from the model (optional override of the mode)</span> |
---|
77 | 0015 <span class="comment">% 'Manual' - Get data manually (optional override of the mode)</span> |
---|
78 | 0016 <span class="comment">%</span> |
---|
79 | 0017 <span class="comment">% NOTE</span> |
---|
80 | 0018 <span class="comment">% 1. Simulation mode: lifetime is 6 hour, refill at midnight to 1000 mamps</span> |
---|
81 | 0019 <span class="comment">% 2. This function is just an alias for getam('DCCT', ...)</span> |
---|
82 | 0020 <span class="comment">%</span> |
---|
83 | 0021 <span class="comment">% Written by Greg Portmann</span> |
---|
84 | 0022 |
---|
85 | 0023 <span class="keyword">if</span> <a href="isfamily.html" class="code" title="function [FamilyFlag, AO] = isfamily(Family, Field)">isfamily</a>(<span class="string">'DCCT'</span>) |
---|
86 | 0024 <span class="keyword">if</span> nargout > 2 |
---|
87 | 0025 [DCCT, tout, DataTime, ErrorFlag] = <a href="getpv.html" class="code" title="function [AM, tout, DataTime, ErrorFlag] = getpv(varargin)">getpv</a>(<span class="string">'DCCT'</span>, <span class="string">'Monitor'</span>, [], varargin{:}); |
---|
88 | 0026 <span class="keyword">else</span> |
---|
89 | 0027 [DCCT, tout] = <a href="getpv.html" class="code" title="function [AM, tout, DataTime, ErrorFlag] = getpv(varargin)">getpv</a>(<span class="string">'DCCT'</span>, <span class="string">'Monitor'</span>, [], varargin{:}); |
---|
90 | 0028 <span class="keyword">end</span> |
---|
91 | 0029 <span class="keyword">else</span> |
---|
92 | 0030 DCCT = NaN; |
---|
93 | 0031 tout = 0; |
---|
94 | 0032 |
---|
95 | 0033 t1 = clock; |
---|
96 | 0034 days = datenum(t1(1:3)) - 719529; <span class="comment">%datenum('1-Jan-1970');</span> |
---|
97 | 0035 tt = 24*60*60*days + 60*60*t1(4) + 60*t1(5) + t1(6); |
---|
98 | 0036 DataTime = fix(tt) + rem(tt,1)*1e9*sqrt(-1); |
---|
99 | 0037 |
---|
100 | 0038 ErrorFlag = -1; |
---|
101 | 0039 <span class="keyword">end</span> |
---|
102 | 0040</pre></div> |
---|
103 | <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> |
---|
104 | </body> |
---|
105 | </html> |
---|