source: BAORadio/AmasNancay/trunk/etude_mergeAna.pic @ 582

Last change on this file since 582 was 582, checked in by campagne, 13 years ago

improve analysis (jec)

File size: 12.6 KB
Line 
1
2
3set source  $1
4set ncycles $2
5
6
7#set fcalib $3
8#set f1420low $4
9#set f1420high $5
10
11set fcalib 1410
12set f1420low 1420.2
13set f1420high 1420.6
14
15
16
17nbins1420 = floor((${f1420high}-${f1420low})/250*8192)
18
19echo $nbins1420
20
21
22
23clearscript diffOnOff
24clearscript evolAt1420Freq
25clearscript evolAt1420SideFreq
26clearscript IntAt1420
27clearscript sigmaRaw1420Side
28############################################################################
29
30defscript evolAtCalibFreq
31
32
33#Follow up of the intensity arround the Calib frequency in different calibration conditions
34# NO calibration
35# Calibration coeff. mean per Run
36# Calibration coeff. per cycles
37
38set fcalib $1
39
40
41newwin 1 2
42n/pl onoffevol.onoffRaw0%cycle ! ! "blue cpts notit nsta"
43settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
44n/pl onoffevol.onoffRaw1%cycle ! ! "red cpts notit nsta"
45setaxelabels "cycle" "I[${fcalib}MHz/6.25MHz] Raw (a.u)" $axedefatt
46
47newwin 1 2
48n/proj hRaw0 onoffevol.onoffRaw0 ! ! ! "blue cpts notit"
49settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
50n/proj hRaw1 onoffevol.onoffRaw1 ! ! ! "red cpts notit"
51settitle "I[${fcalib}MHz/6.25MHz] Raw (a.u)"
52
53
54       
55newwin 1 2
56n/pl onoffevol.onoffRun0%cycle ! ! "blue cpts notit nsta"
57settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
58n/pl onoffevol.onoffRun1%cycle ! ! "red cpts notit nsta"
59setaxelabels "cycle" "I[${fcalib}MHz/6.25MHz] Run (a.u)" $axedefatt
60
61
62newwin 1 2
63n/proj hRun0 onoffevol.onoffRun0 ! ! ! "blue cpts notit"
64settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
65n/proj hRun1 onoffevol.onoffRun1 ! ! ! "red cpts notit"
66settitle "I[${fcalib}MHz/6.25MHz] Run (a.u)"
67
68
69newwin 1 2
70n/pl onoffevol.onoffCycle0%cycle ! ! "blue cpts notit nsta"
71settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
72n/pl onoffevol.onoffCycle1%cycle ! ! "red cpts notit nsta"
73setaxelabels "cycle" "I[${fcalib}MHz/6.25MHz] Cycle (a.u)" $axedefatt
74
75newwin 1 2
76n/proj hCycle0 onoffevol.onoffCycle0 ! ! ! "blue cpts notit"
77settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
78n/proj hCycle1 onoffevol.onoffCycle1 ! ! ! "red cpts notit"
79settitle "I[${fcalib}MHz/6.25MHz] Cycle (a.u)"
80
81
82endscript
83###########################################
84defscript evolAt1420Freq
85
86
87#Follow up of the intensity arround the [1420,1421]MHz frequency in different calibration conditions
88# NO calibration
89# Calibration coeff. mean per Run
90# Calibration coeff. per cycles
91
92
93graphicatt "xylimits=0,500,-0.01,0.01"
94
95newwin 1 2
96n/pl onoffevol.onoffRaw01420%cycle ! ! "blue cpts notit nsta"
97settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
98n/pl onoffevol.onoffRaw11420%cycle ! ! "red cpts notit nsta"
99setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Raw (a.u)" $axedefatt
100
101
102newwin 1 2
103n/pl onoffevol.onoffRun01420%cycle ! ! "blue cpts notit nsta"
104settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
105n/pl onoffevol.onoffRun11420%cycle ! ! "red cpts notit nsta"
106setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Run (a.u)" $axedefatt
107
108
109newwin 1 2
110n/pl onoffevol.onoffCycle01420%cycle ! ! "blue cpts notit nsta"
111settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
112n/pl onoffevol.onoffCycle11420%cycle ! ! "red cpts notit nsta"
113setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Cycle (a.u)" $axedefatt
114
115
116newh1d hSigmaRaw0 -0.01 0.01 25
117newh1d hSigmaRaw1 -0.01 0.01 25
118newh1d hSigmaRun0 -0.01 0.01 25
119newh1d hSigmaRun1 -0.01 0.01 25
120newh1d hSigmaCycl0 -0.01 0.01 25
121newh1d hSigmaCycl1 -0.01 0.01 25
122
123graphicatt ""
124
125newwin 1 1
126n/proj hSigmaRaw0 onoffevol.onoffRaw01420 ! ! ! "blue cpts notit"
127n/proj hSigmaRaw1 onoffevol.onoffRaw11420 ! ! ! "same red cpts notit"
128settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
129setaxelabels "(a.u)" "I[${f1420low},${f1420high}]MHz Raw" $axedefatt
130
131newwin 1 1
132n/proj hSigmaRun0 onoffevol.onoffRun01420 ! ! ! "blue cpts notit"
133n/proj hSigmaRun1 onoffevol.onoffRun11420 ! ! ! "same red cpts notit"
134settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
135setaxelabels "(a.u)" "I[${f1420low},${f1420high}]MHz Run" $axedefatt
136
137
138newwin 1 1
139n/proj hSigmaCycl0 onoffevol.onoffCycle01420 ! ! ! "blue cpts notit"
140n/proj hSigmaCycl1 onoffevol.onoffCycle11420 ! ! ! "same red cpts notit"
141settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
142setaxelabels "(a.u)" "I[${f1420low},${f1420high}]MHz Cycle" $axedefatt
143
144
145endscript
146##################################################
147defscript sigmaRaw1420Side
148
149
150newh1d hSigRaw0All -0.01 0.01 25
151newh1d hSigRaw1All -0.01 0.01 25
152
153n/proj hSigRaw0All onoffevol.onoffRaw01420side
154n/proj hSigRaw1All onoffevol.onoffRaw11420side
155
156echo "Resultats sur ${ncycles} cycles (Ch0, Ch1): mean (${hSigRaw0All.mean}, ${hSigRaw1All.mean}) sigma (${hSigRaw0All.sigma}, ${hSigRaw1All.sigma})"
157
158newwin 1 1
159disp  hSigRaw0All "blue cpts notit"
160disp  hSigRaw1All "red same cpts notit"
161settitle "Mean and Sigma for 1 cycle"
162
163#Ts les 10cycles
164n10cycles = floor(${ncycles}/10)
165x10min = ${hSigRaw0All.xmin}
166x10max = ${hSigRaw0All.xmax}
167n10bin = ${hSigRaw0All.nbin}
168
169       
170for i 0:${n10cycles}
171 ic = ${i}*10+1
172 jc = ${ic}+9
173 newh1d hSigRaw010c${i} ${x10min} ${x10max} ${n10bin}
174 newh1d hSigRaw110c${i} ${x10min} ${x10max} ${n10bin}
175
176 n/proj hSigRaw010c${i}  onoffevol.onoffRaw01420side (cycle>=${ic})&&(cycle<=${jc})
177 cp hSigRaw010c${i} h0
178 mSig010c[i] = ${h0.mean}
179
180 n/proj hSigRaw110c${i}  onoffevol.onoffRaw11420side (cycle>=${ic})&&(cycle<=${jc})
181 cp hSigRaw110c${i} h1
182 mSig110c[i] = ${h1.mean}
183end
184
185
186line2vec hSigRaw010c $mSig010c
187line2vec hSigRaw110c $mSig110c
188
189
190
191
192newwin 1 1
193disp  hSigRaw010c "blue cpts notit"
194disp  hSigRaw110c "red same cpts notit"
195settitle "Mean and Sigma for 10 cycles"
196
197
198endscript
199###########################################
200defscript evolAt1420SideFreq
201
202
203#Follow up of the intensity arround the [${f1420low},${f1420high}]MHz frequency in different calibration conditions
204# NO calibration
205# Calibration coeff. mean per Run
206# Calibration coeff. per cycles
207
208
209graphicatt "xylimits=0,500,-0.01,0.01"
210
211newwin 1 2
212n/pl onoffevol.onoffRaw01420side%cycle ! ! "blue cpts notit nsta"
213settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
214n/pl onoffevol.onoffRaw11420side%cycle ! ! "red cpts notit nsta"
215setaxelabels "cycle" "I[1418,1419]U[1422,1423]MHz Raw (a.u)" $axedefatt
216
217
218newwin 1 2
219n/pl onoffevol.onoffRun01420side%cycle ! ! "blue cpts notit nsta"
220settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
221n/pl onoffevol.onoffRun11420side%cycle ! ! "red cpts notit nsta"
222setaxelabels "cycle" "I[1418,1419]U[1422,1423]MHz Run (a.u)" $axedefatt
223
224
225newwin 1 2
226n/pl onoffevol.onoffCycle01420side%cycle ! ! "blue cpts notit nsta"
227settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
228n/pl onoffevol.onoffCycle11420side%cycle ! ! "red cpts notit nsta"
229setaxelabels "cycle" "I[1418,1419]U[1422,1423]MHz Cycle (a.u)" $axedefatt
230
231
232newh1d hSigmaSideRaw0 -0.01 0.01 25
233newh1d hSigmaSideRaw1 -0.01 0.01 25
234newh1d hSigmaSideRun0 -0.01 0.01 25
235newh1d hSigmaSideRun1 -0.01 0.01 25
236newh1d hSigmaSideCycl0 -0.01 0.01 25
237newh1d hSigmaSideCycl1 -0.01 0.01 25
238
239graphicatt ""
240
241newwin 1 1
242n/proj hSigmaSideRaw0 onoffevol.onoffRaw01420side ! ! ! "blue cpts notit"
243n/proj hSigmaSideRaw1 onoffevol.onoffRaw11420side ! ! ! "same red cpts notit"
244settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
245setaxelabels "(a.u)" "I[1418,1419]U[1422,1423]MHz Raw" $axedefatt
246
247newwin 1 1
248n/proj hSigmaSideRun0 onoffevol.onoffRun01420side ! ! ! "blue cpts notit"
249n/proj hSigmaSideRun1 onoffevol.onoffRun11420side ! ! ! "same red cpts notit"
250settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
251setaxelabels "(a.u)" "I[1418,1419]U[1422,1423]MHz Run" $axedefatt
252
253
254newwin 1 1
255n/proj hSigmaSideCycl0 onoffevol.onoffCycle01420side ! ! ! "blue cpts notit"
256n/proj hSigmaSideCycl1 onoffevol.onoffCycle11420side ! ! ! "same red cpts notit"
257settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
258setaxelabels "(a.u)" "I[1418,1419]U[1422,1423]MHz Cycle" $axedefatt
259
260
261endscript
262
263###########################################
264defscript IntAt1420
265
266
267#Follow up of the intensity arround the [${f1420low},${f1420high}]MHz
268#frequency in different calibration conditions with baseline removed
269# NO calibration
270# Calibration coeff. mean per Run
271# Calibration coeff. per cycles
272
273
274graphicatt "xylimits=0,500,-0.1,0.1"
275
276newwin 1 2
277n/pl onoffevol.${nbins1420}*(onoffRaw01420-onoffRaw01420side)%cycle ! ! "blue cpts notit nsta"
278settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
279n/pl onoffevol.${nbins1420}*(onoffRaw11420-onoffRaw11420side)%cycle ! ! "red cpts notit nsta"
280setaxelabels "cycle" "I 1420MHz Raw (a.u)" $axedefatt
281
282
283newwin 1 2
284n/pl onoffevol.${nbins1420}*(onoffRun01420-onoffRun01420side)%cycle ! ! "blue cpts notit nsta"
285settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
286n/pl onoffevol.${nbins1420}*(onoffRun11420-onoffRun11420side)%cycle ! ! "red cpts notit nsta"
287setaxelabels "cycle" "I 1420MHz Run (a.u)" $axedefatt
288
289
290newwin 1 2
291n/pl onoffevol.${nbins1420}*(onoffCycle01420-onoffCycle01420side)%cycle ! ! "blue cpts notit nsta"
292settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
293n/pl onoffevol.${nbins1420}*(onoffCycle11420-onoffCycle11420side)%cycle ! ! "red cpts notit nsta"
294setaxelabels "cycle" "I 1420MHz Cycle (a.u)" $axedefatt
295
296
297newh1d h1420IntRaw0 -0.1 0.1 25
298newh1d h1420IntRaw1 -0.1 0.1 25
299newh1d h1420IntRun0 -0.1 0.1 25
300newh1d h1420IntRun1 -0.1 0.1 25
301newh1d h1420IntCycl0 -0.1 0.1 25
302newh1d h1420IntCycl1 -0.1 0.1 25
303
304graphicatt ""
305
306newwin 1 1
307n/proj h1420IntRaw0 onoffevol.${nbins1420}*(onoffRaw01420-onoffRaw01420side) ! ! ! "blue cpts notit"
308n/proj h1420IntRaw1 onoffevol.${nbins1420}*(onoffRaw11420-onoffRaw11420side) ! ! ! "same red cpts notit"
309settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
310setaxelabels "(a.u)" "I 1420MHz Raw" $axedefatt
311
312newwin 1 1
313n/proj h1420IntRun0 onoffevol.${nbins1420}*(onoffRun01420-onoffRun01420side) ! ! ! "blue cpts notit"
314n/proj h1420IntRun1 onoffevol.${nbins1420}*(onoffRun11420-onoffRun11420side) ! ! ! "same red cpts notit"
315settitle "ON-OFF Calib Run ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
316setaxelabels "(a.u)" "I 1420MHz Run" $axedefatt
317
318
319
320newwin 1 1
321n/proj h1420IntCycl0 onoffevol.${nbins1420}*(onoffCycle01420-onoffCycle01420side) ! ! ! "blue cpts notit"
322n/proj h1420IntCycl1 onoffevol.${nbins1420}*(onoffCycle11420-onoffCycle11420side) ! ! ! "same red cpts notit"
323settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
324setaxelabels "(a.u)" "I 1420MHz Cycle" $axedefatt
325
326
327
328endscript
329##################################################
330defscript diffOnOff
331
332#
333#Display the ON-OFF over the whole freq. range in diffrent Calib. conditions
334# NO calibration
335# Calibration coeff. mean per Run
336# Calibration coeff. per cycles
337#
338
339
340
341graphicatt "xylimits=1250,1500,-0.01,0.01"
342del snocal0 snocal1
343objaoper meanNoCalib row 0 snocal0
344objaoper meanNoCalib row 1 snocal1
345newwin 1 1
346plot2d snocal0 (n/8192)*250+1250 val n>0 "blue cpts notit nsta"
347plot2d snocal1 (n/8192)*250+1250 val n>0 "red same cpts notit nsta"
348settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
349setaxelabels "Freq. (MHz)" "I (a.u)" $axedefatt
350
351del sruncal0 sruncal1
352objaoper meanPerRunCalib row 0 sruncal0
353objaoper meanPerRunCalib row 1 sruncal1
354newwin 1 1
355plot2d sruncal0 (n/8192)*250+1250 val n>0 "blue cpts notit nsta"
356plot2d sruncal1 (n/8192)*250+1250 val n>0 "red same cpts notit nsta"
357settitle "ON-OFF Calib Run  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
358setaxelabels "Freq. (MHz)" "I (a.u)" $axedefatt
359
360newwin 1 1
361del scyclecal0 scyclecal1
362objaoper meanPerCycleCalib row 0 scyclecal0
363objaoper meanPerCycleCalib row 1 scyclecal1
364plot2d scyclecal0 (n/8192)*250+1250 val n>0 "blue cpts notit nsta"
365plot2d scyclecal1 (n/8192)*250+1250 val n>0 "red same cpts notit nsta"
366settitle "ON-OFF Calib Cycle  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
367setaxelabels "Freq. (MHz)" "I (a.u)" $axedefatt
368
369
370endscript
371
372
373
374
375#Main
376#use minuscule for source label
377
378
379
380
381openppf onoffsurvey_${source}-${ncycles}Cycles.ppf
382print onoffevol
383
384set defatt "font=helvetica,bold,20 fixedfonsize"
385set axedefatt  "font=helvetica,bold,30 fixedfonsize grid"
386
387set defatt ""
388set axedefatt  "grid"
389
390graphicatt ""
391setaxesatt ""
392
393
394#diffOnOff
395#evolAt1420Freq
396#evolAt1420SideFreq
397#IntAt1420
Note: See TracBrowser for help on using the repository browser.