1 | function monrates |
---|
2 | %MONRATES - Tests the analog monitor data rate for BPMs and corrector magnets |
---|
3 | % |
---|
4 | % Tests the analog monitor data rate for BPMs and corrector magnets |
---|
5 | % This test will only work if the AM value is very noisy. (But it |
---|
6 | % always is, if the BPMs are calibrated.) |
---|
7 | |
---|
8 | % |
---|
9 | % Written by Gregory J. Portmann, ALS |
---|
10 | % |
---|
11 | % TODO: adaptation for SOLEIL |
---|
12 | |
---|
13 | alsglobe |
---|
14 | |
---|
15 | |
---|
16 | % BPM Sample Rates |
---|
17 | %StanRate = input(' What is the Stanford timer rate [Hz] = '); |
---|
18 | List = getlist('BPMx'); |
---|
19 | if strcmp(computer, 'PCWIN') |
---|
20 | [BPMxrate, HCMn] = getrate('BPMx', List, 4); |
---|
21 | else |
---|
22 | [BPMxrate, HCMn] = getrate('BPMx', List, 10); |
---|
23 | end |
---|
24 | disp(' '); |
---|
25 | |
---|
26 | figure; clf |
---|
27 | subplot(4,1,1); |
---|
28 | sector = 1+((1:96)-1)/8 + 1/16; |
---|
29 | bar(sector(BPMelem), BPMxrate); |
---|
30 | set(gca,'XTick',1:12) |
---|
31 | xaxis([1 13]); |
---|
32 | %title(['BPM Sample Rates (Stanford Timer at ', num2str(StanRate),' Hz)', ' ', date]); |
---|
33 | title(['BPM Data Rates']); |
---|
34 | xlabel('Sector Number'); |
---|
35 | ylabel('Data Rate [Hz]'); |
---|
36 | |
---|
37 | |
---|
38 | % IDBPM Sample Rates |
---|
39 | List = getlist('IDBPMx'); |
---|
40 | if strcmp(computer, 'PCWIN') |
---|
41 | [IDBPMxrate, HCMn] = getrate('IDBPMx', List, 4); |
---|
42 | else |
---|
43 | [IDBPMxrate, HCMn] = getrate('IDBPMx', List, 10); |
---|
44 | end |
---|
45 | disp(' '); |
---|
46 | |
---|
47 | subplot(4,1,2); |
---|
48 | sector = 1+(IDBPMelem-1)/2 + 1/4; |
---|
49 | bar(sector,IDBPMxrate); |
---|
50 | set(gca,'XTick',1:12) |
---|
51 | xaxis([1 13]); |
---|
52 | title(['IDBPM Data Rates']); |
---|
53 | xlabel('Sector'); |
---|
54 | ylabel('Data Rate [Hz]'); |
---|
55 | |
---|
56 | |
---|
57 | % HCM sample rates |
---|
58 | [HCMrate, HCMn] = getrate('HCM', HCMlist, 4); |
---|
59 | disp(' '); |
---|
60 | |
---|
61 | subplot(4,1,3); |
---|
62 | sector = 1+((1:96)-1)/8 + 1/16; |
---|
63 | bar(sector(HCMelem), HCMrate); |
---|
64 | set(gca,'XTick',1:12) |
---|
65 | xaxis([1 13]); |
---|
66 | title(['Horizontal Corrector Magnet Analog Monitor Data Rate']); |
---|
67 | xlabel('Sector'); |
---|
68 | ylabel('Data Rate [Hz]'); |
---|
69 | |
---|
70 | |
---|
71 | % VCM sample rates |
---|
72 | [VCMrate, VCMn] = getrate('VCM', VCMlist, 4); |
---|
73 | disp(' '); |
---|
74 | |
---|
75 | subplot(4,1,4); |
---|
76 | sector = 1+((1:96)-1)/8 + 1/16; |
---|
77 | bar(sector(VCMelem), VCMrate); |
---|
78 | set(gca,'XTick',1:12) |
---|
79 | xaxis([1 13]); |
---|
80 | title(['Vertical Corrector Magnet Analog Monitor Data Rates']); |
---|
81 | xlabel('Sector'); |
---|
82 | ylabel('Data Rate [Hz]'); |
---|
83 | |
---|
84 | |
---|
85 | addlabel(sprintf('%.1f GeV, %s', GLOBAL_SR_GEV, date)); |
---|
86 | orient tall |
---|