source: MML/trunk/mml/monrates.m @ 4

Last change on this file since 4 was 4, checked in by zhangj, 11 years ago

Initial import--MML version from SOLEIL@2013

File size: 1.9 KB
Line 
1function 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
13alsglobe
14
15
16% BPM Sample Rates
17%StanRate = input('  What is the Stanford timer rate [Hz] = ');
18List = getlist('BPMx');
19if strcmp(computer, 'PCWIN')
20   [BPMxrate, HCMn] = getrate('BPMx', List, 4);
21else
22   [BPMxrate, HCMn] = getrate('BPMx', List, 10);
23end
24disp('  ');
25
26figure; clf
27subplot(4,1,1);
28sector = 1+((1:96)-1)/8 + 1/16;
29bar(sector(BPMelem), BPMxrate);
30set(gca,'XTick',1:12)
31xaxis([1 13]);
32%title(['BPM Sample Rates (Stanford Timer at ', num2str(StanRate),' Hz)', ' ', date]);
33title(['BPM Data Rates']);
34xlabel('Sector Number');
35ylabel('Data Rate [Hz]');
36
37
38% IDBPM Sample Rates
39List = getlist('IDBPMx');
40if strcmp(computer, 'PCWIN')
41   [IDBPMxrate, HCMn] = getrate('IDBPMx', List, 4);
42else
43   [IDBPMxrate, HCMn] = getrate('IDBPMx', List, 10);
44end
45disp('  ');
46
47subplot(4,1,2);
48sector = 1+(IDBPMelem-1)/2 + 1/4;
49bar(sector,IDBPMxrate);
50set(gca,'XTick',1:12)
51xaxis([1 13]);
52title(['IDBPM Data Rates']);
53xlabel('Sector');
54ylabel('Data Rate [Hz]');
55
56
57% HCM sample rates
58[HCMrate, HCMn] = getrate('HCM', HCMlist, 4);
59disp('  ');
60
61subplot(4,1,3);
62sector = 1+((1:96)-1)/8 + 1/16;
63bar(sector(HCMelem), HCMrate);
64set(gca,'XTick',1:12)
65xaxis([1 13]);
66title(['Horizontal Corrector Magnet Analog Monitor Data Rate']);
67xlabel('Sector');
68ylabel('Data Rate [Hz]');
69
70
71% VCM sample rates
72[VCMrate, VCMn] = getrate('VCM', VCMlist, 4);
73disp('  ');
74
75subplot(4,1,4);
76sector = 1+((1:96)-1)/8 + 1/16;
77bar(sector(VCMelem), VCMrate);
78set(gca,'XTick',1:12)
79xaxis([1 13]);
80title(['Vertical Corrector Magnet Analog Monitor Data Rates']);
81xlabel('Sector');
82ylabel('Data Rate [Hz]');
83
84
85addlabel(sprintf('%.1f GeV, %s', GLOBAL_SR_GEV, date));
86orient tall
Note: See TracBrowser for help on using the repository browser.