1 | function Rmat = getbpmresp4FOFB(varargin) |
---|
2 | % GETBPMRESP4FOFB - Gets the orbit response matrice for the fast orbit feedback |
---|
3 | % |
---|
4 | % INPUTS |
---|
5 | % |
---|
6 | % OUTPUTS |
---|
7 | % |
---|
8 | % See Also getbpmresp |
---|
9 | |
---|
10 | % |
---|
11 | %% Written by Laurent S. Nadolski |
---|
12 | |
---|
13 | % Default |
---|
14 | BPMtype = 'IDBPMonly'; % 'AllBPM'; |
---|
15 | fileName = 'BPMRespMat4FOFB_96x96.mat'; |
---|
16 | |
---|
17 | for k = length(varargin):-1:1 |
---|
18 | if strcmpi(varargin{k},'IDBPMonly') |
---|
19 | BPMtype = 'IDBPMonly'; |
---|
20 | varargin(k) = []; |
---|
21 | elseif strcmpi(varargin{k},'AllBPM') |
---|
22 | BPMtype = 'AllBPM'; |
---|
23 | varargin(k) = []; |
---|
24 | elseif strcmpi(varargin{k},'') |
---|
25 | fileName = ''; |
---|
26 | varargin(k) = []; |
---|
27 | end |
---|
28 | end |
---|
29 | |
---|
30 | switch BPMtype |
---|
31 | case 'IDBPMonly' |
---|
32 | BPMdev = getidbpmlist; |
---|
33 | fileName = 'BPMRespMat4FOFB_96x96.mat'; |
---|
34 | case 'AllBPM'; |
---|
35 | BPMdev = family2dev('BPMx'); |
---|
36 | fileName = 'BPMRespMat4FOFB_240x96.mat'; |
---|
37 | end |
---|
38 | |
---|
39 | if ~strcmp('', fileName) |
---|
40 | switch BPMtype |
---|
41 | case 'IDBPMonly' |
---|
42 | fileName = 'BPMRespMat4FOFB_96x96.mat'; |
---|
43 | % Add fullpath to the filename |
---|
44 | fileName = [getfamilydata('Directory','BPMResponse') fileName]; |
---|
45 | case 'AllBPM'; |
---|
46 | fileName = 'BPMRespMat4FOFB_240x96.mat'; |
---|
47 | % Add fullpath to the filename |
---|
48 | fileName = [getfamilydata('Directory','BPMResponse') fileName]; |
---|
49 | end |
---|
50 | end |
---|
51 | |
---|
52 | if isempty(varargin) |
---|
53 | Rmat = getbpmresp('BPMx', BPMdev, 'BPMz', BPMdev, 'FHCOR', 'FVCOR', fileName,'Struct'); |
---|
54 | else |
---|
55 | Rmat = getbpmresp(varargin{:}, fileName); |
---|
56 | end |
---|
57 | end |
---|