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:
2.0 KB
|
Line | |
---|
1 | function plotquad(varargin) |
---|
2 | |
---|
3 | MeanFlag = 1; |
---|
4 | MonitorFlag = 1; |
---|
5 | Field = 'Monitor'; |
---|
6 | |
---|
7 | % Flag factory |
---|
8 | for 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 |
---|
20 | end |
---|
21 | |
---|
22 | Q1 = getpv('Q1', Field); |
---|
23 | Q1c = Q1-mean(Q1); |
---|
24 | Q2 = getpv('Q2',Field); |
---|
25 | Q2c = Q2-mean(Q2); |
---|
26 | Q3 = getpv('Q3',Field); |
---|
27 | Q3c = Q3-mean(Q3); |
---|
28 | Q4 = getpv('Q4', Field); |
---|
29 | Q4c = Q4-mean(Q4); |
---|
30 | Q5 = getpv('Q5', Field); |
---|
31 | Q5c = Q5-mean(Q5); |
---|
32 | Q6 = getpv('Q6', Field); |
---|
33 | Q6c = Q6-mean(Q6); |
---|
34 | Q7 = getpv('Q7', Field); |
---|
35 | Q7c = Q7-mean(Q7); |
---|
36 | Q8 = getpv('Q8', Field); |
---|
37 | Q8c = Q8-mean(Q8); |
---|
38 | Q9 = getpv('Q9', Field); |
---|
39 | Q9c = Q9-mean(Q9); |
---|
40 | Q10 = getpv('Q10', Field); |
---|
41 | Q10c = Q10-mean(Q10); |
---|
42 | |
---|
43 | |
---|
44 | figure |
---|
45 | if 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)) |
---|
88 | else |
---|
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)) |
---|
131 | end |
---|
Note: See
TracBrowser
for help on using the repository browser.