1 | defscript sumSpec |
---|
2 | |
---|
3 | set source "Abell${1}" |
---|
4 | set srclower "abell${1}" |
---|
5 | set date $2 |
---|
6 | # implicitement firstcycle =1 |
---|
7 | set lastcycle $3 |
---|
8 | lastP1cycle = ${lastcycle}+1 |
---|
9 | |
---|
10 | openppf ${toppath}/${source}/${date}${srclower}/diffOnOffRaw_${date}_${srclower}.ppf |
---|
11 | |
---|
12 | #specONOFFRaw<i> Matrix 2 x 8192 : i=0... |
---|
13 | |
---|
14 | for 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; |
---|
20 | end |
---|
21 | |
---|
22 | |
---|
23 | endscript |
---|
24 | |
---|
25 | |
---|
26 | ######################################################################## |
---|
27 | #MAIN |
---|
28 | ######################################################################## |
---|
29 | set cols ( blue red black green purple orange cyan violet yellow ) |
---|
30 | |
---|
31 | set toppath "/sps/baoradio/AmasNancay/JEC" |
---|
32 | set source "Abell${1}" |
---|
33 | set srclower "abell${1}" |
---|
34 | |
---|
35 | #The output spectra |
---|
36 | #newvec specONOFFv0 8192 |
---|
37 | #newvec specONOFFv1 8192 |
---|
38 | |
---|
39 | c++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 | |
---|
44 | set dateTag ( 20110507 20110602 20110729 20110806 ) |
---|
45 | set nCycles ( 24 14 27 26 ) |
---|
46 | line2vec tmpvec $nCycles |
---|
47 | |
---|
48 | #do It |
---|
49 | for i 0:${tmpvec.size} |
---|
50 | sumSpec 85 $dateTag[i] $nCycles[i] |
---|
51 | end |
---|
52 | c++exec specONOFFv0/=tmpvec.Sum(); specONOFFv1/=tmpvec.Sum(); |
---|
53 | |
---|
54 | |
---|
55 | ######### |
---|
56 | newwin 1 1 |
---|
57 | graphicatt "xylimits=1250,1500,-0.01,0.01" |
---|
58 | plot2d specONOFFv0 (n/8192)*250+1250 val n>0 "same blue cpts nsta notit" |
---|
59 | plot2d specONOFFv1 (n/8192)*250+1250 val n>0 "same red cpts nsta notit" |
---|
60 | settitle "ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles" |
---|
61 | setaxelabels "Freq. (MHz)" "I (a.u)" |
---|
62 | |
---|
63 | ######### |
---|
64 | #Perform the frequancy rebinning to compute MEAN & SIGMA |
---|
65 | ######### |
---|
66 | c++compile reducing |
---|
67 | c++link reducing.so doreduc |
---|
68 | |
---|
69 | |
---|
70 | call doreduc |
---|
71 | |
---|
72 | newwin 1 1 |
---|
73 | graphicatt "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" |
---|
80 | settitle "ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles" |
---|
81 | setaxelabels "Freq. (MHz)" "I (a.u)" |
---|
82 | |
---|
83 | newwin 1 1 |
---|
84 | graphicatt "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" |
---|
91 | settitle "ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles" |
---|
92 | setaxelabels "Freq. (MHz)" "I (a.u)" |
---|