source: MML/trunk/machine/SOLEIL/StorageRing/bpm/monbpmhistory_normbeta.m @ 17

Last change on this file since 17 was 17, checked in by zhangj, 10 years ago

To have a stable version on the server.

  • Property svn:executable set to *
File size: 1.2 KB
Line 
1function monbpmhistory_normbeta(varargin)
2% monbpmhistory_normbeta - Read historybuffer of all the BPMs
3%
4
5%%
6if isempty(varargin)   
7    devName = family2tangodev('BPMx');
8else
9    devName = family2tangodev('BPMx',varargin{:});
10end
11
12%%
13Xpos = [];
14Zpos = [];
15Xrmspos = [];
16Zrmspos = [];
17
18% recup fonction beta
19[BetaX, BetaY] = modelbeta('BPMx');
20
21for k = 1:length(devName),
22    %rep = tango_read_attributes(devName{k},{'XPosSAHistory','ZPosSAHistory','XRMSPosSA','ZRMSPosSA'});
23    rep = tango_read_attributes(devName{k},{'XPosSAHistory','ZPosSAHistory'});
24    Xpos(:,k) = rep(1).value/sqrt(BetaX(k));
25    Zpos(:,k) = rep(2).value/sqrt(BetaY(k));
26end
27
28Xrmspos = std(Xpos);
29Zrmspos = std(Zpos);
30
31xtime = (1:size(Xpos,1))/10;
32%%
33figure
34subplot(2,2,1)
35plot(xtime, Xpos-repmat(Xpos(1,:),size(Xpos,1),1))
36xaxis([1 size(Xpos,1)/10])
37ylabel('DX (mm)')
38xlabel('time [s]')
39grid on
40subplot(2,2,2)
41plot(Xrmspos)
42xaxis([0 size(Xpos,2)+1])
43ylabel('Xrms (mm)')
44xlabel('BPM number')
45grid on
46subplot(2,2,3)
47plot(xtime, Zpos-repmat(Zpos(1,:),size(Zpos,1),1))
48xaxis([1 size(Xpos,1)/10])
49ylabel('DZ (mm)')
50xlabel('time [s]')
51grid on
52subplot(2,2,4)
53plot(Zrmspos)
54xaxis([0 size(Xpos,2)+1])
55ylabel('Zrms (mm)')
56xlabel('BPM number')
57grid on
58
59addlabel(datestr(tango_shift_time(rep(2).time)))
Note: See TracBrowser for help on using the repository browser.