source: BAORadio/AmasNancay/trunk/plotDiffOnOff.pic @ 607

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

improve mean ON-OFF with Calib BAO (jec)

File size: 3.6 KB
Line 
1#$1: source
2#$2: nber of cycles
3#$3: number of freq. combined for reducing mean/sigma
4
5set source $1
6set ncycles $2
7set nFreqBin $3
8set action $4
9
10set defatt "font=helvetica,bold,20 fixedfontsize"
11
12
13
14if ( ${action} == "mean" ) then
15
16openppf meanDiffOnOffRaw_${source}-${ncycles}Cycles.ppf
17
18
19##General Mean
20del s0 s1
21objaoper mean row 0 s0
22objaoper mean row 1 s1
23graphicatt "${defatt} xylimits=1250,1500,-0.01,0.01"
24newwin 1 1
25plot2d s0 (n/8192)*250+1250 val n>0 "cpts blue nsta notit"
26plot2d s1 (n/8192)*250+1250 val n>0 "same cpts red nsta notit"
27settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt
28setaxelabels "Freq. (MHz)" "<(ON-OFF)[r,c]/Gain[r]>_{r,c}" $defatt
29
30
31
32##Reduced Mean
33newwin 1 1
34del rs0 rs1
35objaoper meanred row 0 rs0
36objaoper meanred row 1 rs1
37plot2d rs0 (n/${nFreqBin})*250+1250 val n>0 "marker=fcircle,5 blue nsta notit"
38plot2d rs1 (n/${nFreqBin})*250+1250 val n>0 "same marker=fcircle,5 red nsta notit"
39settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt
40setaxelabels "Freq. (MHz)" "<(ON-OFF)[r,c]/Gain[r]>_{r,c} Rebin(${nFreqBin})" $defatt
41
42
43##Reduced Mean
44newwin 1 1
45del rss0 rss1
46objaoper sigmared row 0 rss0
47objaoper sigmared row 1 rss1
48plot2d rss0 (n/${nFreqBin})*250+1250 val n>0 "marker=fcircle,5 blue nsta notit"
49plot2d rss1 (n/${nFreqBin})*250+1250 val n>0 "same marker=fcircle,5 red nsta notit"
50settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt
51setaxelabels "Freq. (MHz)" "Sigma[(ON-OFF)[r,c]/Gain[r]] Rebin(${nFreqBin})" $defatt
52
53######
54else
55######
56
57openppf medianDiffOnOffRaw_${source}-${ncycles}Cycles.ppf
58
59
60##General Median
61del s0 s1
62objaoper median row 0 s0
63objaoper median row 1 s1
64graphicatt "xylimits=1250,1500,-0.01,0.01"
65newwin 1 1
66plot2d s0 (n/8192)*250+1250 val n>0 "cpts blue nsta notit"
67plot2d s1 (n/8192)*250+1250 val n>0 "same cpts red nsta notit"
68settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt
69setaxelabels "Freq. (MHz)" "Median[(ON-OFF)[r,c]/Gain[r]]"  $defatt
70
71
72##Reduced Mean of the median
73newwin 1 1
74del rs0 rs1
75objaoper meanmedred row 0 rs0
76objaoper meanmedred row 1 rs1
77graphicatt "xylimits=1250,1500,-0.01,0.01"
78plot2d rs0 (n/${nFreqBin})*250+1250 val n>0 "marker=fcircle,5 blue nsta notit"
79plot2d rs1 (n/${nFreqBin})*250+1250 val n>0 "same marker=fcircle,5 red nsta notit"
80settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt
81setaxelabels "Freq. (MHz)" "Mean Median[(ON-OFF)[r,c]/Gain[r]] Rebin(${nFreqBin})" $defatt
82
83
84##Reduced Sigma of the median
85newwin 1 1
86del rss0 rss1
87objaoper sigmamedred row 0 rss0
88objaoper sigmamedred row 1 rss1
89graphicatt "xylimits=1250,1500,0,0.01"
90plot2d rss0 (n/${nFreqBin})*250+1250 val n>0 "marker=fcircle,5 blue nsta notit"
91plot2d rss1 (n/${nFreqBin})*250+1250 val n>0 "same marker=fcircle,5 red nsta notit"
92settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt
93setaxelabels "Freq. (MHz)" "Sigma Median[(ON-OFF)[r,c]/Gain[r]] Rebin(${nFreqBin})" $defatt
94
95
96##Normalized General Median
97del ngms0 ngms1
98objaoper medianNorm row 0 ngms0
99objaoper medianNorm row 1 ngms1
100graphicatt "xylimits=1250,1500,-2,2"
101newwin 1 1
102plot2d ngms0 (n/8192)*250+1250 val n>0 "cpts blue nsta notit"
103plot2d ngms1 (n/8192)*250+1250 val n>0 "same cpts red nsta notit"
104settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt
105setaxelabels "Freq. (MHz)" "Norm Median[(ON-OFF)[r,c]/Gain[r]]"  $defatt
106
107del prod
108c++exec TVector<r_4>prod(ngms0.NElts(),BaseArray::RowVector); prod=ngms0&&ngms1;KeepObj(prod);
109newwin 1 1
110plot2d prod (n/8192)*250+1250 val n>0 "cpts blue nsta notit"
111settitle "$source (${ncycles} cycles)" ' ' $defatt
112setaxelabels "Freq. (MHz)" "Product Norm Median[(ON-OFF)[r,c]/Gain[r]]"  $defatt
113 
114
115endif
116
Note: See TracBrowser for help on using the repository browser.