source: BAORadio/AmasNancay/trunk/plotRawDiffOnOff.pic@ 632

Last change on this file since 632 was 631, checked in by torrento, 14 years ago

Added function sigmaRawBand and 3-cluster treatment

File size: 16.9 KB
RevLine 
[608]1#source should be in minuscule letters
[631]2# gain = 1 if on,off have been divided by gain
3
[608]4set source $1
5set ncycles $2
[631]6set gain $3
[608]7
[611]8#c++compile meanSigSum
9#c++link meanSigSum.so meanSigSum
[608]10
11set defatt "font=helvetica,bold,20 fixedfonsize"
12set axedefatt "font=helvetica,bold,30 fixedfonsize grid"
13
14set defatt ""
15set axedefatt "grid"
16
17graphicatt ""
18setaxesatt "$axedefatt"
19
[631]20set path "/sps/baoradio/AmasNancay/AST"
21if ( $gain == "0" ) then
22 openppf ${path}/rawOnOffDiffNoGain_${source}-${ncycles}Cycles.ppf
23 echo "Opening file ${path}/rawOnOffDiffNoGain_${source}-${ncycles}Cycles.ppf"
24else
25 openppf ${path}/rawOnOffDiff_${source}-${ncycles}Cycles.ppf
26 echo "Opening file ${path}/rawOnOffDiff_${source}-${ncycles}Cycles.ppf"
27endif
[608]28
[631]29# Abell 85, 500 cycles
30if ( ${source} == "abell85" ) then
31 set f1420low 1420.2
32 set f1420high 1420.6
33 set packVal "1 10 25 50 100"
34endif
[608]35
[631]36<<<<<<< .mine
37# Abell 1205, 600, 750 cycles
38if ( ${source} == "abell1205" ) then
39 set f1420low 1420.1
40 set f1420high 1420.6
41 if ( $ncycles == 600 ) then
42 set packVal "1 10 25 50 100 120"
43 else
44 set packVal "1 10 15 50 75 125 150"
45 endif
46endif
47=======
[626]48set path "/sps/baoradio/AmasNancay/JEC"
[611]49openppf ${path}/rawOnOffDiff_${source}-${ncycles}Cycles.ppf
[631]50>>>>>>> .r630
[608]51
[631]52# Abell 2440, 210 cycles
53if ( ${source} == "abell2440" ) then
54 set f1420low 1420.4
55 set f1420high 1420.7
56 set packVal "1 10 25 42"
57endif
[608]58
[631]59# All clusters, 1549 cycles
60if ( ${source} == "abell85-abell2440-abell1205" ) then
61 set f1420low 1420.1
62 set f1420high 1420.7
63 set packVal "1 10 25 50 100 260"
64endif
65
66echo "f1420low=${f1420low}, f1420high=${f1420high}"
67echo "Packing values="${packVal}
68
69nbins1420 = floor((${f1420high}-${f1420low})/250*8192)
70#echo $nbins1420
71
[608]72clearscript evolAt1420Freq
73clearscript evolAt1420SideFreq
74clearscript evolAt1410a1415OffOn
75clearscript sigmaRaw1420Side
76clearscript sigmaRaw1410a1415
[631]77clearscript sigmaRawBand
[608]78clearscript IntAt1420
79clearscript diffOnOff
80###########################################
81defscript evolAt1420Freq
82
83
84#Follow up of the intensity arround the [1420,1421]MHz frequency in different calibration conditions
85# NO calibration
86
87graphicatt "xylimits=0,500,-0.01,0.01"
88
89newwin 1 2
90n/pl onoffevol.onoffRaw01420%cycle ! ! "blue cpts notit nsta"
91settitle "Raw (ON-OFF)/OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
92n/pl onoffevol.onoffRaw11420%cycle ! ! "red cpts notit nsta"
93setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Raw (a.u)" $axedefatt
94
95
96newh1d hSigmaRaw0 -0.01 0.01 25
97newh1d hSigmaRaw1 -0.01 0.01 25
98
99graphicatt ""
100
101newwin 1 1
102n/proj hSigmaRaw0 onoffevol.onoffRaw01420 ! ! ! "blue cpts notit"
103n/proj hSigmaRaw1 onoffevol.onoffRaw11420 ! ! ! "same red cpts notit"
104settitle "Raw (ON-OFF)/OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
105setaxelabels "(a.u)" "I[${f1420low},${f1420high}]MHz Raw" $axedefatt
106
107endscript
108##################################################
109defscript sigmaRaw1420Side
110
111c++compile rebining
112c++link rebining.so dorebin
113
114#col 3 = onoffRaw01420side Ch 0
115#col 4 = onoffRaw11420side Ch 1
116
117ntcol2var onoffevol 3 linCh0All
118line2vec vecCh0All $linCh0All
119
120ntcol2var onoffevol 4 linCh1All
121line2vec vecCh1All $linCh1All
122
123#packing values only valid for 500 cycles...
124set packVal "1 10 25 50 100"
125set sigmaCh0 ""
126set errsigCh0 ""
127set sigmaCh1 ""
128set errsigCh1 ""
129
130foreach ipack ( $packVal )
131
132#Packing per ipack
133 del invec
134 del outvec
135 cp vecCh0All invec
136 call dorebin $ipack
137 mean0 = ${outvec.sum}/${outvec.size}
138 sigma0 = sqrt(${outvec.sumsq}/${outvec.size}-${mean0}*${mean0})
139 errsig0 = ${sigma0}/sqrt(2*${outvec.size})
140 set sigmaCh0 "${sigmaCh0} ${sigma0}"
141 set errsigCh0 "${errsigCh0} ${errsig0}"
142#
143 del invec
144 del outvec
145 cp vecCh1All invec
146 call dorebin $ipack
147 mean1 = ${outvec.sum}/${outvec.size}
148 sigma1 = sqrt(${outvec.sumsq}/${outvec.size}-${mean1}*${mean1})
149 errsig1 = ${sigma1}/sqrt(2*${outvec.size})
150 set sigmaCh1 "${sigmaCh1} ${sigma1}"
151 set errsigCh1 "${errsigCh1} ${errsig1}"
152end
153
154
155newnt nt0 x y ey
156newnt nt1 x y ey
157
158set x0 ( $packVal )
159set y0 ( $sigmaCh0 )
160set ey0 ( $errsigCh0 )
161
162set x1 ( $packVal )
163set y1 ( $sigmaCh1 )
164set ey1 ( $errsigCh1 )
165
166for i 0:$#x0
167 line2nt nt0 $x0[i] $y0[i] $ey0[i]
168 line2nt nt1 $x1[i] $y1[i] $ey1[i]
169end
170
171
172newwin 1 1
173plot2de nt0 x y 0 ey 1 "blue marker=fcircle,9 notit nsta"
174plot2de nt1 x y 0 ey 1 "same red marker=fcircle,9 notit nsta"
175n = ${#x0}-1
176func $y0[0]/sqrt(x) $x0[0] $x0[n] 100 "same"
177settitle "Sigma [1418,1419]U[1422,1423]MHz ${source} Ch 0 (blue) Ch 1 (red)" ' ' $defatt
178setaxelabels "num of cycles" "Sigma (a.u)" $axedefatt
179
180endscript
181##################################################
182defscript sigmaRaw1410a1415
183
184c++compile rebining
185c++link rebining.so dorebin
186
187
188#col 5 = onoffRaw0f14101415 Ch 0
189#col 6 = onoffRaw1f14101415 Ch 1
190
191ntcol2var onoffevol 5 linCh0All
192line2vec vecCh0All $linCh0All
193
194ntcol2var onoffevol 6 linCh1All
195line2vec vecCh1All $linCh1All
196
197#packing values only valid for 500 cycles...
198set packVal "1 10 25 50 100"
199set sigmaCh0 ""
200set errsigCh0 ""
201set sigmaCh1 ""
202set errsigCh1 ""
203
204
205foreach ipack ( $packVal )
206
207#Packing per ipack
208 del invec
209 del outvec
210 cp vecCh0All invec
211 call dorebin $ipack
212 mean0 = ${outvec.sum}/${outvec.size}
213 sigma0 = sqrt(${outvec.sumsq}/${outvec.size}-${mean0}*${mean0})
214 errsig0 = ${sigma0}/sqrt(2*${outvec.size})
215 set sigmaCh0 "${sigmaCh0} ${sigma0}"
216 set errsigCh0 "${errsigCh0} ${errsig0}"
217#
218 del invec
219 del outvec
220 cp vecCh1All invec
221 call dorebin $ipack
222 mean1 = ${outvec.sum}/${outvec.size}
223 sigma1 = sqrt(${outvec.sumsq}/${outvec.size}-${mean1}*${mean1})
224 errsig1 = ${sigma1}/sqrt(2*${outvec.size})
225 set sigmaCh1 "${sigmaCh1} ${sigma1}"
226 set errsigCh1 "${errsigCh1} ${errsig1}"
227end
228
229
230newnt nt0 x y ey
231newnt nt1 x y ey
232
233set x0 ( $packVal )
234set y0 ( $sigmaCh0 )
235set ey0 ( $errsigCh0 )
236
237set x1 ( $packVal )
238set y1 ( $sigmaCh1 )
239set ey1 ( $errsigCh1 )
240
241for i 0:$#x0
242 line2nt nt0 $x0[i] $y0[i] $ey0[i]
243 line2nt nt1 $x1[i] $y1[i] $ey1[i]
244end
245
246
247newwin 1 1
248plot2de nt0 x y 0 ey 1 "blue marker=fcircle,9 notit nsta"
249plot2de nt1 x y 0 ey 1 "same red marker=fcircle,9 notit nsta"
250n = ${#x0}-1
251func $y0[0]/sqrt(x) $x0[0] $x0[n] 100 "same"
252settitle "Sigma [1410,1415]MHz ${source} Ch 0 (blue) Ch 1 (red)" ' ' $defatt
253setaxelabels "num of cycles" "Sigma (a.u)" $axedefatt
254
255endscript
256###########################################
[631]257# Old function sigmaRaw1400a1420
258defscript sigmaRawBand
259# flow,fhigh = frequency limits for integration band
260# offFilt = 1 we divide on-off by filtered Off
261
262set flow $1
263set fhigh $2
264set offFilt $3
265set nclusters $4
266graphicatt ""
267
268if ( $nclusters == 1 ) then
269## Individual clusters (update of mergeAnaFiles.cc on 09/01/2012)
270## mergeAnaFiles.cc -> meanRawDiffOnOffCycles -> rawOnOffDiff_[source]-[n]Cycles.ppf
271## Frequency bands [1405,1415], [1405,1410], [1410,1415] MHz
272## [1405,1415]: col 11,12 = onoffRaw[0,1]f14051415 Ch[0,1] (ON-OFF)/OFF_filt
273## [1405,1410]: col 13,14 = onoffRaw[0,1]f14051410 Ch[0,1]
274## [1410,1415]: col 5, 6 = onoffRaw[0,1]f14101415 Ch[0,1]
275## [1405,1415]: col 15,16 = diffonoffRaw[0,1]f14051415 Ch[0,1] (ON-OFF)
276## [1405,1410]: col 17,18 = diffonoffRaw[0,1]f14051410 Ch[0,1]
277## [1410,1415]: col 19,20 = diffonoffRaw[0,1]f14101415 Ch[0,1]
278 if ( $flow == 1405 ) then
279 if ( $fhigh == 1415 ) then
280 if ( $offFilt == 1 ) then
281 set col0 11
282 set col1 12
283 else
284 set col0 15
285 set col1 16
286 endif
287 endif
288 if ( $fhigh == 1410 ) then
289 if ( $offFilt == 1 ) then
290 set col0 13
291 set col1 14
292 else
293 set col0 17
294 set col1 18
295 endif
296 endif
297 endif
298 if ( $flow == 1410 ) then
299 if ( $fhigh == 1415 ) then
300 if ( $offFilt == 1 ) then
301 set col0 5
302 set col1 6
303 else
304 set col0 19
305 set col1 20
306 endif
307 endif
308 endif
309
310 ntcol2var onoffevol $col0 linCh0All
311 line2vec vecCh0All $linCh0All
312 ntcol2var onoffevol $col1 linCh1All
313 line2vec vecCh1All $linCh1All
314else
315 ## Execute if analysing All Clusters abell85-abell2440-abell1205
316 ## mergeAnaFiles.cc -> MeanRawDiffOnOffAllClusters -> rawOnOffDiff_[sources]-[n]Cycles.ppf
317 ## Shifts the distribution of each cluster to mean~0, to avoid
318 ## offset problems when regrouping values
319 ## col 5,6 = onoffRaw0f14101415 Ch 0,1 [1410,1415]MHz
320 ## col 7,8 = onoffRaw1f141014125 Ch 0,1 [1410,1412.5]MHz
321 ## col 9,10 = onoffRaw1f14101411 Ch 0,1 [1410,1411]MHz
322
323 if ( $flow == 1410 ) then
324 if ( $fhigh == 1415 ) then
325 set col0 5
326 set col1 6
327 endif
328 if ( $fhigh == 14125 ) then
329 set col0 7
330 set col1 8
331 endif
332 if ( $fhigh == 1411 ) then
333 set col0 9
334 set col1 10
335 endif
336 endif
337 echo Analysing ntuple columns $col0, $col1
338
339 ntcol2var onoffevol $col0 linCh0All
340 line2vec invecCh0All $linCh0All
341 ntcol2var onoffevol $col1 linCh1All
342 line2vec invecCh1All $linCh1All
343
344 del v85 v2440 v1205
345 exptovec v85 onoffevol cycletot-1 srcID==85
346 set v85_first ${v85.min}
347 set v85_last ${v85.max}
348 exptovec v2440 onoffevol cycletot-1 srcID==2440
349 set v2440_first ${v2440.min}
350 set v2440_last ${v2440.max}
351 exptovec v1205 onoffevol cycletot-1 srcID==1205
352 set v1205_first ${v1205.min}
353 set v1205_last ${v1205.max}
354
355 del vecCh085 vecCh02440 vecCh01205 vecCh185 vecCh12440 vecCh11205 vecCh0All vecCh1All
356 h/copy invecCh0All vecCh085 ${v85_first}:${v85_last}
357 h/copy invecCh0All vecCh02440 $v2440_first:$v2440_last
358 h/copy invecCh0All vecCh01205 $v1205_first:$v1205_last
359 h/copy invecCh1All vecCh185 $v85_first:$v85_last
360 h/copy invecCh1All vecCh12440 $v2440_first:$v2440_last
361 h/copy invecCh1All vecCh11205 $v1205_first:$v1205_last
362
363 c++exec double m,s; int l=-1; \
364 MeanSigma(vecCh085,m,s) ; vecCh085 -= m;\
365 MeanSigma(vecCh02440,m,s); vecCh02440 -= m;\
366 MeanSigma(vecCh01205,m,s); vecCh01205 -= m;\
367 MeanSigma(vecCh185,m,s) ; vecCh185 -= m;\
368 MeanSigma(vecCh12440,m,s); vecCh12440 -= m;\
369 MeanSigma(vecCh11205,m,s); vecCh11205 -= m;\
370 TVector<r_8> vecCh0All(invecCh0All.NElts()); KeepObj(vecCh0All); \
371 TVector<r_8> vecCh1All(invecCh1All.NElts()); KeepObj(vecCh1All); \
372 for (int i=0;i<vecCh085.NElts();i++){l++;vecCh0All(l)=vecCh085(i);vecCh1All(l)=vecCh185(i);}\
373 for (int j=0;j<vecCh02440.NElts();j++){l++;vecCh0All(l)=vecCh02440(j);vecCh1All(l)=vecCh12440(j);}\
374 for (int k=0;k<vecCh01205.NElts();k++){l++;vecCh0All(l)=vecCh01205(k);vecCh1All(l)=vecCh11205(k);}
375 ## End All Clusters
376endif
377
378set sigmaCh0 ""
379set errsigCh0 ""
380set sigmaCh1 ""
381set errsigCh1 ""
382
383c++compile rebining
384c++link rebining.so dorebin
385
386foreach ipack ( $packVal )
387
388#Packing per ipack
389 del invec
390 del outvec
391 cp vecCh0All invec
392 call dorebin $ipack
393 mean0 = ${outvec.sum}/${outvec.size}
394 sigma0 = sqrt(${outvec.sumsq}/${outvec.size}-${mean0}*${mean0})
395 errsig0 = ${sigma0}/sqrt(2*${outvec.size})
396 set sigmaCh0 "${sigmaCh0} ${sigma0}"
397 set errsigCh0 "${errsigCh0} ${errsig0}"
398#
399 del invec
400 del outvec
401 cp vecCh1All invec
402 call dorebin $ipack
403 mean1 = ${outvec.sum}/${outvec.size}
404 sigma1 = sqrt(${outvec.sumsq}/${outvec.size}-${mean1}*${mean1})
405 errsig1 = ${sigma1}/sqrt(2*${outvec.size})
406 set sigmaCh1 "${sigmaCh1} ${sigma1}"
407 set errsigCh1 "${errsigCh1} ${errsig1}"
408end
409
410newnt nt0 x y ey
411newnt nt1 x y ey
412
413set x0 ( $packVal )
414set y0 ( $sigmaCh0 )
415set ey0 ( $errsigCh0 )
416
417set x1 ( $packVal )
418set y1 ( $sigmaCh1 )
419set ey1 ( $errsigCh1 )
420
421for i 0:$#x0
422 line2nt nt0 $x0[i] $y0[i] $ey0[i]
423 line2nt nt1 $x1[i] $y1[i] $ey1[i]
424end
425
426newwin 1 1
427plot2de nt0 x y 0 ey 1 "blue marker=fcircle,9 notit nsta"
428plot2de nt1 x y 0 ey 1 "same red marker=fcircle,9 notit nsta"
429n = ${#x0}-1
430func $y0[0]/sqrt(x) $x0[0] $x0[n] 100 "same"
431settitle "Sigma [$flow,$fhigh]MHz ${source} Ch 0 (blue) Ch 1 (red)" ' ' $defatt
432setaxelabels "num of cycles" "Sigma (a.u)" $axedefatt
433
434del h0 h1
435set xmin -0.01
436set xmax 0.01
437newh1d h0 $xmin $xmax 200
438newh1d h1 $xmin $xmax 200
439if ( $offFilt == 0 ) then
440 if ( $gain == 0 ) then
441 del h0 h1
442 newh1d h0 -0.0001 0.0001 200
443 newh1d h1 -0.0001 0.0001 200
444 endif
445 newwin 1 1
446 n/proj h0 onoffevol.diffonoffRaw0f$flow$fhigh ! ! ! "blue notit"
447 n/proj h1 onoffevol.diffonoffRaw1f$flow$fhigh ! ! ! "same red notit"
448 settitle "diffonoffRaw [$flow,$fhigh]MHz ${source} Ch 0 (blue) Ch 1 (red)" ' ' $defatt
449 newwin 1 1
450 n/pl onoffevol.diffonoffRaw1f$flow$fhigh%cycle ! ! "cpts red notit"
451 n/pl onoffevol.diffonoffRaw0f$flow$fhigh%cycle ! ! "cpts same blue notit"
452 settitle "diffonoffRaw [$flow,$fhigh]MHz ${source} Ch 0 (blue) Ch 1 (red)" ' ' $defatt
453else
454 newwin 1 1
455 n/proj h0 onoffevol.onoffRaw0f$flow$fhigh ! ! ! "cpts blue notit"
456 n/proj h1 onoffevol.onoffRaw1f$flow$fhigh ! ! ! "cpts same red notit"
457 settitle "onoffRaw [$flow,$fhigh]MHz ${source} Ch 0 (blue) Ch 1 (red)" ' ' $defatt
458 newwin 1 1
459 n/pl onoffevol.onoffRaw0f$flow$fhigh%cycle ! ! "cpts blue notit"
460 n/pl onoffevol.onoffRaw1f$flow$fhigh%cycle ! ! "cpts same red notit"
461 settitle "onoffRaw [$flow,$fhigh]MHz ${source} Ch 0 (blue) Ch 1 (red)" ' ' $defatt
462endif
463
464endscript
465##########################################
466defscript evolAt1400a1415OffOn
467
468graphicatt "xylimits=0,${ncycles},0.99,1.02"
469
470newwin 1 1
471n/pl onoffevol.offRaw0f14001415%cycle ! ! "blue cpts notit nsta"
472n/pl onoffevol.offRaw1f14001415%cycle ! ! "same red cpts notit nsta"
473n/pl onoffevol.onRaw0f14001415%cycle ! ! "same cyan cpts notit nsta"
474n/pl onoffevol.onRaw1f14001415%cycle ! ! "same orange cpts notit nsta"
475settitle "Raw OFF and ON ${source} Ch 0 (blue/cyan) Ch 1 (red/orange) ${ncycles}cycles " ' ' $defatt
476setaxelabels "cycle" "I[1400,1415]MHz Raw (a.u)" $axedefatt
477
478endscript
479##########################################
[608]480defscript evolAt1410a1415OffOn
481
482graphicatt "xylimits=0,${ncycles},0.99,1.02"
483
484newwin 1 1
485n/pl onoffevol.offRaw0f14101415%cycle ! ! "blue cpts notit nsta"
486n/pl onoffevol.offRaw1f14101415%cycle ! ! "same red cpts notit nsta"
487n/pl onoffevol.onRaw0f14101415%cycle ! ! "same cyan cpts notit nsta"
488n/pl onoffevol.onRaw1f14101415%cycle ! ! "same orange cpts notit nsta"
489settitle "Raw (OFF,ON)/OFF ${source} Ch 0 (blue/cyan) Ch 1 (red/orange) ${ncycles}cycles " ' ' $defatt
490setaxelabels "cycle" "I[1410,1415]MHz Raw (a.u)" $axedefatt
491
492graphicatt "xylimits=0,${ncycles},-0.005,0.005"
493newwin 1 1
494n/pl onoffevol.(onRaw0f14101415-offRaw0f14101415)%cycle ! ! "blue cpts notit nsta"
495n/pl onoffevol.(onRaw1f14101415-offRaw1f14101415)%cycle ! ! "same red cpts notit nsta"
[611]496settitle "Raw (ON-OFF)/OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
[608]497setaxelabels "cycle" "DI [1410,1415]MHz Raw (a.u)" $axedefatt
498
499endscript
500###########################################
501defscript evolAt1420SideFreq
502
503
504#Follow up of the intensity arround the [${f1420low},${f1420high}]MHz frequency in different calibration conditions
505# NO calibration
506
507
508graphicatt "xylimits=0,500,-0.01,0.01"
509
510newwin 1 2
511n/pl onoffevol.onoffRaw01420side%cycle ! ! "blue cpts notit nsta"
512settitle "Raw (ON-OFF)/OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
513n/pl onoffevol.onoffRaw11420side%cycle ! ! "red cpts notit nsta"
514setaxelabels "cycle" "I[1418,1419]U[1422,1423]MHz Raw (a.u)" $axedefatt
515
516
517newh1d hSigmaSideRaw0 -0.01 0.01 25
518newh1d hSigmaSideRaw1 -0.01 0.01 25
519
520graphicatt ""
521
522newwin 1 1
523n/proj hSigmaSideRaw0 onoffevol.onoffRaw01420side ! ! ! "blue cpts notit"
524n/proj hSigmaSideRaw1 onoffevol.onoffRaw11420side ! ! ! "same red cpts notit"
525settitle "Raw (ON-OFF)/OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
526setaxelabels "(a.u)" "I[1418,1419]U[1422,1423]MHz Raw" $axedefatt
527
528endscript
529###########################################
530defscript IntAt1420
531
532
533#Follow up of the intensity arround the [${f1420low},${f1420high}]MHz
534#frequency in different calibration conditions with baseline removed
535# NO calibration
536
537graphicatt "xylimits=0,500,-0.1,0.1"
538
539newwin 1 2
540n/pl onoffevol.${nbins1420}*(onoffRaw01420-onoffRaw01420side)%cycle ! ! "blue cpts notit nsta"
541settitle "Raw (ON-OFF)/OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
542n/pl onoffevol.${nbins1420}*(onoffRaw11420-onoffRaw11420side)%cycle ! ! "red cpts notit nsta"
543setaxelabels "cycle" "I 1420MHz Raw (a.u)" $axedefatt
544
545
546
547newh1d h1420IntRaw0 -0.1 0.1 25
548newh1d h1420IntRaw1 -0.1 0.1 25
549
550graphicatt ""
551
552newwin 1 1
553n/proj h1420IntRaw0 onoffevol.${nbins1420}*(onoffRaw01420-onoffRaw01420side) ! ! ! "blue cpts notit"
554n/proj h1420IntRaw1 onoffevol.${nbins1420}*(onoffRaw11420-onoffRaw11420side) ! ! ! "same red cpts notit"
555settitle "Raw (ON-OFF)/OFF ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles " ' ' $defatt
556setaxelabels "(a.u)" "I 1420MHz Raw" $axedefatt
557
558endscript
559##################################################
560defscript diffOnOff
561
562graphicatt "xylimits=1250,1500,-0.01,0.01"
563
564del s0 s1
565objaoper meanOvOffNoCalib row 0 s0
566objaoper meanOvOffNoCalib row 1 s1
567
568newwin
569plot2d s0 (n/8192)*250+1250 val n>0 "cpts blue notit nsta"
570plot2d s1 (n/8192)*250+1250 val n>0 "same cpts red notit nsta"
[611]571settitle "plot Raw (ON-OFF)/OFF ${source} ${ncycles} cycles, Ch 0 (blue) Ch 1 (red)"
[608]572setaxelabels "Freq. (MHz)" "I (a.u)"
573
574del stot
575c++exec TVector<r_4> stot=s0+s1; stot/=2.; KeepObj(stot);
576
577newwin
578plot2d stot (n/8192)*250+1250 val n>0 "cpts blue notit nsta"
579settitle "Mean Raw (ON-OFF)/OFF ${source} ${ncycles} cycles"
580setaxelabels "Freq. (MHz)" "I (a.u)"
581endscript
582##################################################
Note: See TracBrowser for help on using the repository browser.