source: MML/trunk/applications/orbit/camd/CAMDRestore.m @ 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: 7.8 KB
Line 
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
5ad=getad;
6filetype         = 'RESTORE';      %check to see if correct file type
7sys.machine      = 'CAMD';         %machine for control
8sys.mode         = 'simulator';    %online or simulator
9sys.datamode     = 'REAL';         %raw or real (for real: (1)response matrix multiplied by bpm gains, (2) BPM reads have gain, offset
10sys.bpmslp       = 3.0;            %BPM sleep time in sec
11sys.globalperiod = 2.0;            %BPM sleep time in sec
12sys.silverperiod = 2.0;            %BPM sleep time in sec
13sys.plane        = 1;              %plane (1=horizontal 2=vertical)
14sys.algo         = 'SVD';          %fitting algorithm
15sys.pbpm         = 1;              %use of photon BPMs
16sys.filpath      = ad.Directory.Orbit;       %file path in MATLAB
17sys.respfiledir  = ad.Directory.OpsData;                                           %response matrix directory
18sys.respfilename = ad.OpsData.BPMRespFile;                                         %response matrix file
19%sys.relative     = 2;             %set in initialization relative or absolute BPM plot 1=absolute, 2=relative
20sys.fdbk         = 0;              %no feedback
21sys.abort        = 0;              %reset abort flag
22sys.mxs          = 60;            %maximum ring circumference
23sys.xlimax       = 60;            %abcissa plot limit
24sys.mxphi(1)     = 5;              %maximum horizontal phase advance
25sys.mxphi(2)     = 2;              %maximum vertical phase advance
26sys.xscale       = 'meter';        %abcissa plotting mode (meter or phase)
27 
28%*=== HORIZONTAL DATA ===*
29bpm(1).dev      = 10;              %maximum orbit deviation
30bpm(1).drf      = 0;               %dispersion component zero
31bpm(1).id       = 1;               %BPM selection
32bpm(1).scalemode= 0;               %BPM scale mode 0=manual mode, 1=autoscale
33bpm(1).ylim     = 0.5;               %BPM vertical axis scale
34cor(1).fract    = 1.0;             %fraction of correctors
35cor(1).id=1;                       %COR selection
36cor(1).scalemode=0;                %COR scale mode 0=manual mode, 1=autoscale
37cor(1).ylim     = 30;              %COR horizontal axis scale (amp)
38rsp(1).disp     = 'off';           %mode for matrix column display
39rsp(1).eig      = 'off';           %mode for eigenvector display
40rsp(1).fit      = 0;               %valid fit flag
41rsp(1).rfflag   = 0;               %rf fitting flag
42rsp(1).savflag  = 0;               %save solution flag
43rsp(1).nsvd     = 15;              %number of singular values
44rsp(1).svdtol   = 0;               %svd tolerance (0 uses number of singular values)
45rsp(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
49etaxwt=0.0;
50%     name       index  fit (0/1) weight etaweight
51bpmx={
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
77corx={
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 ===*
97bpm(2).dev=10;          %maximum orbit deviation
98bpm(2).drf=0;           %dispersion component zero
99bpm(2).id=1;            %BPM selection
100bpm(2).scalemode=0;     %BPM scale mode 0=manual mode, 1=autoscale
101bpm(2).ylim=0.25;        %BPM vertical axis scale
102cor(2).fract=1.0;       %fraction of correctors
103cor(2).id  =1;            %COR selection
104cor(2).scalemode=0;     %COR scale mode 0=manual mode, 1=autoscale
105cor(2).ylim =30;         %COR vertical axis scale (amp)
106rsp(2).disp ='off';     %mode for matrix column display
107rsp(2).eig  ='off';     %mode for eigenvector display
108rsp(2).fit  =0;         %valid fit flag
109rsp(2).rfflag=0;        %rf fitting flag
110rsp(2).savflag=0;       %save solution flag
111rsp(2).nsvd=12;         %number of singular values
112rsp(2).svdtol=0;        %svd tolerance (0 uses number of singular values)
113rsp(2).nsvdmx=1;        %default maximum number of singular values
114 
115etaywt=50;  %nominal response ~0.25 peak, 5kHz difference ~0.0025 peak (factor 100)
116%     name       index  fit (0/1) weight   etaweight
117bpmy={
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
141cory={
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
158bly={
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 
Note: See TracBrowser for help on using the repository browser.