source: BAORadio/AmasNancay/v2/mergeRawOnOff.pic@ 611

Last change on this file since 611 was 536, checked in by campagne, 14 years ago

nouvelle analyse ON-OFF des raw data (jec)

File size: 3.0 KB
Line 
1defscript sumSpec
2
3set source "Abell${1}"
4set srclower "abell${1}"
5set date $2
6# implicitement firstcycle =1
7set lastcycle $3
8lastP1cycle = ${lastcycle}+1
9
10openppf ${toppath}/${source}/${date}${srclower}/diffOnOffRaw_${date}_${srclower}.ppf
11
12#specONOFFRaw<i> Matrix 2 x 8192 : i=0...
13
14for ic 1:${lastP1cycle}
15 del sOnOffv0
16 del sOnOffv1
17 objaoper specONOFFRaw${ic} row 0 sOnOffv0
18 objaoper specONOFFRaw${ic} row 1 sOnOffv1
19 c++exec specONOFFv0+=sOnOffv0; specONOFFv1+=sOnOffv1;
20end
21
22
23endscript
24
25
26########################################################################
27#MAIN
28########################################################################
29set cols ( blue red black green purple orange cyan violet yellow )
30
31set toppath "/sps/baoradio/AmasNancay/JEC"
32set source "Abell${1}"
33set srclower "abell${1}"
34
35#The output spectra
36#newvec specONOFFv0 8192
37#newvec specONOFFv1 8192
38
39c++exec TVector<r_4> specONOFFv0(8192,2); TVector<r_4> specONOFFv1(8192,2); \
40 KeepObj(specONOFFv0);KeepObj(specONOFFv1);
41
42#set the runs to merge
43
44set dateTag ( 20110507 20110602 20110729 20110806 )
45set nCycles ( 24 14 27 26 )
46line2vec tmpvec $nCycles
47
48#do It
49for i 0:${tmpvec.size}
50 sumSpec 85 $dateTag[i] $nCycles[i]
51end
52c++exec specONOFFv0/=tmpvec.Sum(); specONOFFv1/=tmpvec.Sum();
53
54
55#########
56newwin 1 1
57graphicatt "xylimits=1250,1500,-0.01,0.01"
58plot2d specONOFFv0 (n/8192)*250+1250 val n>0 "same blue cpts nsta notit"
59plot2d specONOFFv1 (n/8192)*250+1250 val n>0 "same red cpts nsta notit"
60settitle "ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles"
61setaxelabels "Freq. (MHz)" "I (a.u)"
62
63#########
64#Perform the frequancy rebinning to compute MEAN & SIGMA
65#########
66c++compile reducing
67c++link reducing.so doreduc
68
69
70call doreduc
71
72newwin 1 1
73graphicatt "xylimits=1250,1500,-0.01,0.01"
74 del redMeanv0
75 del redMeanv1
76 objaoper reducedMeanDiffOnOff row 0 redMeanv0
77 objaoper reducedMeanDiffOnOff row 1 redMeanv1
78 plot2d redMeanv0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit"
79 plot2d redMeanv1 (n/32)*250+1250 val n>0 "same red marker=fcircle,7 nsta notit"
80settitle "ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles"
81setaxelabels "Freq. (MHz)" "I (a.u)"
82
83newwin 1 1
84graphicatt "xylimits=1250,1500,0,0.001"
85 del redSigmav0
86 del redSigmav1
87 objaoper reducedSigmaDiffOnOff row 0 redSigmav0
88 objaoper reducedSigmaDiffOnOff row 1 redSigmav1
89 plot2d redSigmav0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit"
90 plot2d redSigmav1 (n/32)*250+1250 val n>0 "same red marker=fcircle,7 nsta notit"
91settitle "ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles"
92setaxelabels "Freq. (MHz)" "I (a.u)"
Note: See TracBrowser for help on using the repository browser.