1 | %function [sys,bpmx,bpmy,bpm,corx,cory,cor,rsp,bly]=restore |
---|
2 | %system parameter save file |
---|
3 | %timestamp: 18-Jan-2002 08:08:08 |
---|
4 | %comment: Save System |
---|
5 | ad=getad; |
---|
6 | filetype = 'RESTORE'; %check to see if correct file type |
---|
7 | sys.machine = 'CAMD'; %machine for control |
---|
8 | sys.mode = 'simulator'; %online or simulator |
---|
9 | sys.datamode = 'REAL'; %raw or real (for real: (1)response matrix multiplied by bpm gains, (2) BPM reads have gain, offset |
---|
10 | sys.bpmslp = 3.0; %BPM sleep time in sec |
---|
11 | sys.globalperiod = 2.0; %BPM sleep time in sec |
---|
12 | sys.silverperiod = 2.0; %BPM sleep time in sec |
---|
13 | sys.plane = 1; %plane (1=horizontal 2=vertical) |
---|
14 | sys.algo = 'SVD'; %fitting algorithm |
---|
15 | sys.pbpm = 1; %use of photon BPMs |
---|
16 | sys.filpath = ad.Directory.Orbit; %file path in MATLAB |
---|
17 | sys.respfiledir = ad.Directory.OpsData; %response matrix directory |
---|
18 | sys.respfilename = ad.OpsData.BPMRespFile; %response matrix file |
---|
19 | %sys.relative = 2; %set in initialization relative or absolute BPM plot 1=absolute, 2=relative |
---|
20 | sys.fdbk = 0; %no feedback |
---|
21 | sys.abort = 0; %reset abort flag |
---|
22 | sys.mxs = 60; %maximum ring circumference |
---|
23 | sys.xlimax = 60; %abcissa plot limit |
---|
24 | sys.mxphi(1) = 5; %maximum horizontal phase advance |
---|
25 | sys.mxphi(2) = 2; %maximum vertical phase advance |
---|
26 | sys.xscale = 'meter'; %abcissa plotting mode (meter or phase) |
---|
27 | |
---|
28 | %*=== HORIZONTAL DATA ===* |
---|
29 | bpm(1).dev = 10; %maximum orbit deviation |
---|
30 | bpm(1).drf = 0; %dispersion component zero |
---|
31 | bpm(1).id = 1; %BPM selection |
---|
32 | bpm(1).scalemode= 0; %BPM scale mode 0=manual mode, 1=autoscale |
---|
33 | bpm(1).ylim = 0.5; %BPM vertical axis scale |
---|
34 | cor(1).fract = 1.0; %fraction of correctors |
---|
35 | cor(1).id=1; %COR selection |
---|
36 | cor(1).scalemode=0; %COR scale mode 0=manual mode, 1=autoscale |
---|
37 | cor(1).ylim = 30; %COR horizontal axis scale (amp) |
---|
38 | rsp(1).disp = 'off'; %mode for matrix column display |
---|
39 | rsp(1).eig = 'off'; %mode for eigenvector display |
---|
40 | rsp(1).fit = 0; %valid fit flag |
---|
41 | rsp(1).rfflag = 0; %rf fitting flag |
---|
42 | rsp(1).savflag = 0; %save solution flag |
---|
43 | rsp(1).nsvd = 15; %number of singular values |
---|
44 | rsp(1).svdtol = 0; %svd tolerance (0 uses number of singular values) |
---|
45 | rsp(1).nsvdmx = 1; %default maximum number of singular values |
---|
46 | |
---|
47 | %Note: only fit and weight for fitting will be used in orbit program from this array |
---|
48 | % Name and index are loaded from middleware |
---|
49 | etaxwt=0.0; |
---|
50 | % name index fit (0/1) weight etaweight |
---|
51 | bpmx={ |
---|
52 | { '1BPM1 ' 1 1 1.000 etaxwt } |
---|
53 | { '1BPM2 ' 2 1 1.000 etaxwt } |
---|
54 | { '1BPM3 ' 3 1 1.000 etaxwt } |
---|
55 | { '1BPM4 ' 4 1 1.000 etaxwt } |
---|
56 | { '1BPM5 ' 5 1 1.000 etaxwt } |
---|
57 | { '2BPM1 ' 6 1 1.000 etaxwt } |
---|
58 | { '2BPM2 ' 7 1 1.000 etaxwt } |
---|
59 | { '2BPM3 ' 8 1 1.000 etaxwt } |
---|
60 | { '2BPM4 ' 9 1 1.000 etaxwt } |
---|
61 | { '2BPM5 ' 10 1 1.000 etaxwt } |
---|
62 | { '3BPM1 ' 11 1 1.000 etaxwt } |
---|
63 | { '3BPM2 ' 12 1 1.000 etaxwt } |
---|
64 | { '3BPM3 ' 13 1 1.000 etaxwt } |
---|
65 | { '3BPM4 ' 14 1 1.000 etaxwt } |
---|
66 | { '3BPM5 ' 15 1 1.000 etaxwt } |
---|
67 | { '4BPM1 ' 16 1 1.000 etaxwt } |
---|
68 | { '4BPM2 ' 17 1 1.000 etaxwt } |
---|
69 | { '4BPM3 ' 18 1 1.000 etaxwt } |
---|
70 | { '4BPM4 ' 19 1 1.000 etaxwt } |
---|
71 | { '4BPM5 ' 20 1 1.000 etaxwt } |
---|
72 | }; |
---|
73 | |
---|
74 | %Note: only fit, weight for fitting will be used in orbit program from this array |
---|
75 | % Name and index are loaded from middleware |
---|
76 | % name index fit (0/1) weight |
---|
77 | corx={ |
---|
78 | {'1CX1 ' 1 1 1.0 } |
---|
79 | {'1CX2 ' 2 1 1.0 } |
---|
80 | {'1CX3 ' 3 1 1.0 } |
---|
81 | {'1CX4 ' 4 1 1.0 } |
---|
82 | {'2CX1 ' 5 1 1.0 } |
---|
83 | {'2CX2 ' 6 1 1.0 } |
---|
84 | {'2CX3 ' 7 1 1.0 } |
---|
85 | {'2CX4 ' 8 1 1.0 } |
---|
86 | {'3CX1 ' 9 1 1.0 } |
---|
87 | {'3CX2 ' 10 1 1.0 } |
---|
88 | {'3CX3 ' 11 1 1.0 } |
---|
89 | {'3CX4 ' 12 1 1.0 } |
---|
90 | {'4CX1 ' 13 1 1.0 } |
---|
91 | {'4CX2 ' 14 1 1.0 } |
---|
92 | {'4CX3 ' 15 1 1.0 } |
---|
93 | {'4CX4 ' 16 1 1.0 } |
---|
94 | }; |
---|
95 | |
---|
96 | %*=== VERTICAL DATA ===* |
---|
97 | bpm(2).dev=10; %maximum orbit deviation |
---|
98 | bpm(2).drf=0; %dispersion component zero |
---|
99 | bpm(2).id=1; %BPM selection |
---|
100 | bpm(2).scalemode=0; %BPM scale mode 0=manual mode, 1=autoscale |
---|
101 | bpm(2).ylim=0.25; %BPM vertical axis scale |
---|
102 | cor(2).fract=1.0; %fraction of correctors |
---|
103 | cor(2).id =1; %COR selection |
---|
104 | cor(2).scalemode=0; %COR scale mode 0=manual mode, 1=autoscale |
---|
105 | cor(2).ylim =30; %COR vertical axis scale (amp) |
---|
106 | rsp(2).disp ='off'; %mode for matrix column display |
---|
107 | rsp(2).eig ='off'; %mode for eigenvector display |
---|
108 | rsp(2).fit =0; %valid fit flag |
---|
109 | rsp(2).rfflag=0; %rf fitting flag |
---|
110 | rsp(2).savflag=0; %save solution flag |
---|
111 | rsp(2).nsvd=12; %number of singular values |
---|
112 | rsp(2).svdtol=0; %svd tolerance (0 uses number of singular values) |
---|
113 | rsp(2).nsvdmx=1; %default maximum number of singular values |
---|
114 | |
---|
115 | etaywt=50; %nominal response ~0.25 peak, 5kHz difference ~0.0025 peak (factor 100) |
---|
116 | % name index fit (0/1) weight etaweight |
---|
117 | bpmy={ |
---|
118 | { '1BPM1 ' 1 1 1.000 etaxwt } |
---|
119 | { '1BPM2 ' 2 1 1.000 etaxwt } |
---|
120 | { '1BPM3 ' 3 1 1.000 etaxwt } |
---|
121 | { '1BPM4 ' 4 1 1.000 etaxwt } |
---|
122 | { '1BPM5 ' 5 1 1.000 etaxwt } |
---|
123 | { '2BPM1 ' 6 1 1.000 etaxwt } |
---|
124 | { '2BPM2 ' 7 1 1.000 etaxwt } |
---|
125 | { '2BPM3 ' 8 1 1.000 etaxwt } |
---|
126 | { '2BPM4 ' 9 1 1.000 etaxwt } |
---|
127 | { '2BPM5 ' 10 1 1.000 etaxwt } |
---|
128 | { '3BPM1 ' 11 1 1.000 etaxwt } |
---|
129 | { '3BPM2 ' 12 1 1.000 etaxwt } |
---|
130 | { '3BPM3 ' 13 1 1.000 etaxwt } |
---|
131 | { '3BPM4 ' 14 1 1.000 etaxwt } |
---|
132 | { '3BPM5 ' 15 1 1.000 etaxwt } |
---|
133 | { '4BPM1 ' 16 1 1.000 etaxwt } |
---|
134 | { '4BPM2 ' 17 1 1.000 etaxwt } |
---|
135 | { '4BPM3 ' 18 1 1.000 etaxwt } |
---|
136 | { '4BPM4 ' 19 1 1.000 etaxwt } |
---|
137 | { '4BPM5 ' 20 1 1.000 etaxwt } |
---|
138 | }; |
---|
139 | |
---|
140 | % name index fit (0/1) weight |
---|
141 | cory={ |
---|
142 | {'1CY1 ' 1 1 1.0 } |
---|
143 | {'1CY2 ' 2 1 1.0 } |
---|
144 | {'1CY3 ' 3 1 1.0 } |
---|
145 | {'2CY1 ' 4 1 1.0 } |
---|
146 | {'2CY2 ' 5 1 1.0 } |
---|
147 | {'2CY3 ' 6 1 1.0 } |
---|
148 | {'3CY1 ' 7 1 1.0 } |
---|
149 | {'3CY2 ' 8 1 1.0 } |
---|
150 | {'3CY3 ' 9 1 1.0 } |
---|
151 | {'4CY1 ' 10 1 1.0 } |
---|
152 | {'4CY2 ' 11 1 1.0 } |
---|
153 | {'4CY3 ' 12 1 1.0 } |
---|
154 | }; |
---|
155 | %Note: only fit and weight for fitting will be used in orbit program from this array |
---|
156 | % Name and index are loaded from middleware |
---|
157 | % name index fit (0/1) weight |
---|
158 | bly={ |
---|
159 | { 'BL1 ' 1 0 100.000 } |
---|
160 | { 'BL2 ' 2 0 100.000 } |
---|
161 | { 'BL3 ' 3 0 100.000 } |
---|
162 | { 'BL4 ' 4 0 100.000 } |
---|
163 | { 'BL5 ' 5 0 100.000 } |
---|
164 | { 'BL6 ' 6 0 100.000 } |
---|
165 | { 'BL7 ' 7 0 100.000 } |
---|
166 | { 'BL8 ' 8 0 100.000 } |
---|
167 | { 'BL9 ' 9 0 100.000 } |
---|
168 | { 'BL10' 10 0 100.000 } |
---|
169 | { 'BL11' 11 0 100.000 } |
---|
170 | }; |
---|
171 | |
---|