source: MML/trunk/machine/SOLEIL/StorageRing/bpm/plotDDraw.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: 2.9 KB
Line 
1function plotDD(AM,isup,ishift)
2
3figure
4
5bpmnum = (1:7)  + ishift;
6turnnum = 4:40;
7
8h1=subplot(2,2,1);
9plot(AM.Data.Va(bpmnum ,turnnum)','.-')
10ylabel('Va (a.u.)')
11suptitle(sprintf('Cell %d',1+isup))
12
13h2=subplot(2,2,2);
14plot(AM.Data.Vb(bpmnum ,turnnum)','.-')
15ylabel('Vb (a.u.)')
16
17h3=subplot(2,2,3);
18plot(AM.Data.Vc(bpmnum,turnnum)','.-')
19ylabel('Vc (a.u.)')
20xlabel('BPM number')
21
22h4=subplot(2,2,4);
23plot(AM.Data.Vd(bpmnum,turnnum)','.-')
24ylabel('Vd (a.u.)')
25xlabel('BPM number')
26
27linkaxes([h1 h2 h3 h4],'x');
28set([h1 h2 h3 h4],'XGrid','On','YGrid','On');
29legendstr = eval(['{', sprintf('''BPM[%2d %d]'',',AM.DeviceList(bpmnum,:)'), '}']);
30legend1 = legend(...
31  legendstr,...
32  'LineWidth',1,...
33  'Position',[0.3202 0.4961 0.4257 0.02956],...
34  'Orientation','horizontal');
35
36figure
37
38bpmnum = (8:15)  + ishift;
39
40h1=subplot(2,2,1);
41plot(AM.Data.Va(bpmnum,turnnum)','.-')
42ylabel('Va (a.u.)')
43suptitle(sprintf('Cell %d',2+isup))
44
45h2=subplot(2,2,2);
46plot(AM.Data.Vb(bpmnum ,turnnum)','.-')
47ylabel('Vb (a.u.)')
48
49h3=subplot(2,2,3);
50plot(AM.Data.Vc(bpmnum,turnnum)','.-')
51grid on
52ylabel('Vc (a.u.)')
53xlabel('BPM number')
54
55h4=subplot(2,2,4);
56plot(AM.Data.Vd(bpmnum,turnnum)','.-')
57ylabel('Vd (a.u.)')
58xlabel('BPM number')
59
60linkaxes([h1 h2 h3 h4],'x');
61set([h1 h2 h3 h4],'XGrid','On','YGrid','On');
62legendstr = eval(['{', sprintf('''BPM[%2d %d]'',',AM.DeviceList(bpmnum,:)'), '}']);
63legend1 = legend(...
64  legendstr,...
65  'LineWidth',1,...
66  'Position',[0.3202 0.4961 0.4257 0.02956],...
67  'Orientation','horizontal');
68
69figure
70
71bpmnum = (16:23)  + ishift;
72
73h1=subplot(2,2,1);
74plot(AM.Data.Va(bpmnum,turnnum)','.-')
75ylabel('Va (a.u.)')
76suptitle(sprintf('Cell %d',3+isup))
77
78h2=subplot(2,2,2);
79plot(AM.Data.Vb(bpmnum ,turnnum)','.-')
80grid on
81ylabel('Vb (a.u.)')
82
83h3=subplot(2,2,3);
84plot(AM.Data.Vc(bpmnum,turnnum)','.-')
85ylabel('Vc (a.u.)')
86xlabel('BPM number')
87
88h4=subplot(2,2,4);
89plot(AM.Data.Vd(bpmnum,turnnum)','.-')
90ylabel('Vd (a.u.)')
91xlabel('BPM number')
92
93linkaxes([h1 h2 h3 h4],'x');
94set([h1 h2 h3 h4],'XGrid','On','YGrid','On');
95legendstr = eval(['{', sprintf('''BPM[%2d %d]'',',AM.DeviceList(bpmnum,:)'), '}']);
96legend1 = legend(...
97  legendstr,...
98  'LineWidth',1,...
99  'Position',[0.3202 0.4961 0.4257 0.02956],...
100  'Orientation','horizontal');
101
102figure
103
104bpmnum = (24:30)  + ishift;
105
106h1=subplot(2,2,1);
107plot(AM.Data.Va(bpmnum,turnnum)','.-')
108ylabel('Va (a.u.)')
109suptitle(sprintf('Cell %d',4+isup))
110
111h2=subplot(2,2,2);
112plot(AM.Data.Vb(bpmnum ,turnnum)','.-')
113ylabel('Vb (a.u.)')
114
115h3=subplot(2,2,3);
116plot(AM.Data.Vc(bpmnum,turnnum)','.-')
117ylabel('Vc (a.u.)')
118xlabel('BPM number')
119
120h4=subplot(2,2,4);
121plot(AM.Data.Vd(bpmnum,turnnum)','.-')
122ylabel('Vd (a.u.)')
123xlabel('BPM number')
124
125linkaxes([h1 h2 h3 h4],'x');
126set([h1 h2 h3 h4],'XGrid','On','YGrid','On');
127legendstr = eval(['{', sprintf('''BPM[%2d %d]'',',AM.DeviceList(bpmnum,:)'), '}']);
128legend1 = legend(...
129  legendstr,...
130  'LineWidth',1,...
131  'Position',[0.3202 0.4961 0.4257 0.02956],...
132  'Orientation','horizontal');
Note: See TracBrowser for help on using the repository browser.