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 bpminit_orb</title> |
---|
6 | <meta name="keywords" content="bpminit_orb"> |
---|
7 | <meta name="description" content="BPMINIT_Orb - Initialize electron BPM data for ORBIT program"> |
---|
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="#">applications</a> > <a href="index.html">orbit</a> > bpminit_orb.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 applications/orbit <img alt=">" border="0" src="../../right.png"></a></td></tr></table>--> |
---|
19 | |
---|
20 | <h1>bpminit_orb |
---|
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>BPMINIT_Orb - Initialize electron BPM data for ORBIT program</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 varargout = bpminit_orb </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"> BPMINIT_Orb - Initialize electron BPM data for ORBIT program</pre></div> |
---|
31 | |
---|
32 | <!-- crossreference --> |
---|
33 | <h2><a name="_cross"></a>CROSS-REFERENCE INFORMATION <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> |
---|
34 | This function calls: |
---|
35 | <ul style="list-style-image:url(../../matlabicon.gif)"> |
---|
36 | </ul> |
---|
37 | This function is called by: |
---|
38 | <ul style="list-style-image:url(../../matlabicon.gif)"> |
---|
39 | </ul> |
---|
40 | <!-- crossreference --> |
---|
41 | |
---|
42 | |
---|
43 | <h2><a name="_source"></a>SOURCE CODE <a href="#_top"><img alt="^" border="0" src="../../up.png"></a></h2> |
---|
44 | <div class="fragment"><pre>0001 <a name="_sub0" href="#_subfunctions" class="code">function varargout = bpminit_orb</a> |
---|
45 | 0002 <span class="comment">% BPMINIT_Orb - Initialize electron BPM data for ORBIT program</span> |
---|
46 | 0003 |
---|
47 | 0004 <span class="comment">%</span> |
---|
48 | 0005 <span class="comment">% Written by William J. Corbett</span> |
---|
49 | 0006 <span class="comment">% Adapted by Laurent S. Nadolski</span> |
---|
50 | 0007 |
---|
51 | 0008 BPMxFamily = <span class="string">'BPMx'</span>; |
---|
52 | 0009 BPMzFamily = <span class="string">'BPMz'</span>; |
---|
53 | 0010 |
---|
54 | 0011 AO = getao; |
---|
55 | 0012 |
---|
56 | 0013 <span class="comment">%horizontal plane ***</span> |
---|
57 | 0014 BPM(1).AOFamily = BPMxFamily; |
---|
58 | 0015 BPM(1).name = AO.(BPMxFamily).CommonNames; |
---|
59 | 0016 BPM(1).s = AO.(BPMxFamily).Position; |
---|
60 | 0017 ntbpm = size(BPM(1).name,1); |
---|
61 | 0018 BPM(1).mode = 0; <span class="comment">%display to show name, toggle for BPM.ifit</span> |
---|
62 | 0019 BPM(1).ref = zeros(ntbpm,1); <span class="comment">%...BPM.ref,des,abs all set in reference read</span> |
---|
63 | 0020 BPM(1).des = zeros(ntbpm,1); <span class="comment">%...initialize array</span> |
---|
64 | 0021 BPM(1).act = zeros(ntbpm,1); <span class="comment">%...initialize array</span> |
---|
65 | 0022 BPM(1).rffit = zeros(ntbpm,1); <span class="comment">%...initialize dispersion component</span> |
---|
66 | 0023 BPM(1).avail = (1:ntbpm)'; <span class="comment">%...initialize all BPMs available</span> |
---|
67 | 0024 BPM(1).ifit = (1:ntbpm)'; <span class="comment">%...initialize all BPMs on for fitting</span> |
---|
68 | 0025 BPM(1).fit = zeros(ntbpm,1); <span class="comment">%...initialize fitted solution zero</span> |
---|
69 | 0026 BPM(1).wt = ones(ntbpm,1); <span class="comment">%...SVD fitting weights</span> |
---|
70 | 0027 BPM(1).etawt = ones(ntbpm,1); <span class="comment">%...SVD dispersion fitting weights</span> |
---|
71 | 0028 BPM(1).id = 1; <span class="comment">%...initialize BPM selection</span> |
---|
72 | 0029 BPM(1).ATindex = AO.(BPMxFamily).AT.ATIndex; <span class="comment">%load AT indices</span> |
---|
73 | 0030 BPM(1).ntbpm = ntbpm; <span class="comment">% number of bpms</span> |
---|
74 | 0031 |
---|
75 | 0032 |
---|
76 | 0033 <span class="comment">% vertical plane</span> |
---|
77 | 0034 BPM(2).AOFamily= BPMzFamily; |
---|
78 | 0035 BPM(2).name = AO.(BPMzFamily).CommonNames; |
---|
79 | 0036 BPM(2).s = AO.(BPMzFamily).Position; |
---|
80 | 0037 ntbpm = size(BPM(2).name,1); |
---|
81 | 0038 BPM(2).mode = 0; <span class="comment">%display to show name, toggle for BPM.ifit</span> |
---|
82 | 0039 BPM(2).ref = zeros(ntbpm,1); <span class="comment">%...BPM.ref,des,abs all set in reference read</span> |
---|
83 | 0040 BPM(2).des = zeros(ntbpm,1); <span class="comment">%...initialize array</span> |
---|
84 | 0041 BPM(2).act = zeros(ntbpm,1); <span class="comment">%...initialize array</span> |
---|
85 | 0042 BPM(2).rffit= zeros(ntbpm,1); <span class="comment">%...initialize dispersion component</span> |
---|
86 | 0043 BPM(2).avail= (1:ntbpm)'; <span class="comment">%...initialize all BPMs available</span> |
---|
87 | 0044 BPM(2).ifit = (1:ntbpm)'; <span class="comment">%...initialize all BPMs on for fitting</span> |
---|
88 | 0045 BPM(2).fit = zeros(ntbpm,1); <span class="comment">%...initialize fitted solution zero</span> |
---|
89 | 0046 BPM(2).wt = ones(ntbpm,1); <span class="comment">%...SVD fitting weights</span> |
---|
90 | 0047 BPM(2).etawt= ones(ntbpm,1); <span class="comment">%...SVD dispersion fitting weights</span> |
---|
91 | 0048 BPM(2).id = 1; <span class="comment">%...initialize BPM selection</span> |
---|
92 | 0049 BPM(2).ATindex = AO.(BPMxFamily).AT.ATIndex; <span class="comment">%load AT indices</span> |
---|
93 | 0050 BPM(2).ntbpm = ntbpm; <span class="comment">%number of bpms</span> |
---|
94 | 0051 |
---|
95 | 0052 varargout{1} = BPM;</pre></div> |
---|
96 | <hr><address>Generated on Mon 21-May-2007 15:32:41 by <strong><a href="http://www.artefact.tk/software/matlab/m2html/">m2html</a></strong> © 2003</address> |
---|
97 | </body> |
---|
98 | </html> |
---|