source: MML/trunk/machine/SOLEIL/StorageRing/quad/plotquad.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: 2.0 KB
Line 
1function plotquad(varargin)
2
3MeanFlag = 1;
4MonitorFlag = 1;
5Field = 'Monitor';
6
7% Flag factory
8for i = length(varargin):-1:1
9    if strcmpi(varargin{i},'Mean')
10        MeanFlag = 1;
11        varargin(i) = [];
12    elseif strcmpi(varargin{i},'NoMean')
13        MeanFlag = 0;
14        varargin(i) = [];
15    elseif strcmpi(varargin{i},'Setpoint')
16        Field = 'Setpoint';
17    elseif strcmpi(varargin{i},'Offset1')
18        Field = 'Offset1';
19    end
20end
21
22Q1 = getpv('Q1', Field);
23Q1c = Q1-mean(Q1);
24Q2 = getpv('Q2',Field);
25Q2c = Q2-mean(Q2);
26Q3 = getpv('Q3',Field);
27Q3c = Q3-mean(Q3);
28Q4 = getpv('Q4', Field);
29Q4c = Q4-mean(Q4);
30Q5 = getpv('Q5', Field);
31Q5c = Q5-mean(Q5);
32Q6 = getpv('Q6', Field);
33Q6c = Q6-mean(Q6);
34Q7 = getpv('Q7', Field);
35Q7c = Q7-mean(Q7);
36Q8 = getpv('Q8', Field);
37Q8c = Q8-mean(Q8);
38Q9 = getpv('Q9', Field);
39Q9c = Q9-mean(Q9);
40Q10 = getpv('Q10', Field);
41Q10c = Q10-mean(Q10);
42
43
44figure
45if MeanFlag
46    subplot(5,2,1)
47    bar(Q1c)
48    ylabel('Q1')
49
50    subplot(5,2,2)
51    bar(Q2c)
52    ylabel('Q2')
53
54    subplot(5,2,3)
55    bar(Q3c)
56    ylabel('Q3')
57
58    subplot(5,2,4)
59
60    bar(Q4c)
61    ylabel('Q4')
62
63    subplot(5,2,5)
64    bar(Q5c)
65    ylabel('Q5')
66
67    subplot(5,2,6)
68    bar(Q6c)
69    ylabel('Q6')
70
71    subplot(5,2,7)
72    bar(Q7c)
73    ylabel('Q7')
74
75    subplot(5,2,8)
76    bar(Q8c)
77    ylabel('Q8')
78
79    subplot(5,2,9)
80    bar(Q9c)
81    ylabel('Q9')
82
83    subplot(5,2,10)
84    bar(Q10c)
85    ylabel('Q10')
86
87    suptitle(sprintf('Quadrupole %s values around average value for all families', Field))
88else
89
90    subplot(5,2,1)
91    bar(Q1)
92    ylabel('Q1')
93
94    subplot(5,2,2)
95    bar(Q2)
96    ylabel('Q2')
97
98    subplot(5,2,3)
99    bar(Q3)
100    ylabel('Q3')
101
102    subplot(5,2,4)
103    bar(Q4)
104    ylabel('Q4')
105
106    subplot(5,2,5)
107    bar(Q5)
108    ylabel('Q5')
109
110    subplot(5,2,6)
111    bar(Q6)
112    ylabel('Q6')
113
114    subplot(5,2,7)
115    bar(Q7)
116    ylabel('Q7')
117
118    subplot(5,2,8)
119    bar(Q8)
120    ylabel('Q8')
121
122    subplot(5,2,9)
123    bar(Q9)
124    ylabel('Q9')
125
126    subplot(5,2,10)
127    bar(Q10)
128    ylabel('Q10')
129
130    suptitle(sprintf('Quadrupole %s values for all families', Field))
131end
Note: See TracBrowser for help on using the repository browser.