Index: /BAORadio/AmasNancay/trunk/etude_mergeAna.pic
===================================================================
--- /BAORadio/AmasNancay/trunk/etude_mergeAna.pic	(revision 627)
+++ /BAORadio/AmasNancay/trunk/etude_mergeAna.pic	(revision 628)
@@ -59,5 +59,4 @@
 set fcalib $1
 
-
 newwin 1 2
 n/pl onoffevol.onoffRaw0%cycle ! ! "blue cpts notit nsta"
@@ -106,5 +105,5 @@
 
 
-#Follow up of the intensity arround the [1420,1421]MHz frequency in different calibration conditions
+#Follow up of the intensity around the [1420,1421]MHz frequency in different calibration conditions
 # NO calibration
 # Calibration coeff. mean per Run
@@ -134,11 +133,12 @@
 setaxelabels "cycle" "I[${f1420low},${f1420high}]MHz Cycle (a.u)" $axedefatt
 
-
-newh1d hSigmaRaw0 -0.01 0.01 25
-newh1d hSigmaRaw1 -0.01 0.01 25
-newh1d hSigmaRun0 -0.01 0.01 25
-newh1d hSigmaRun1 -0.01 0.01 25
-newh1d hSigmaCycl0 -0.01 0.01 25
-newh1d hSigmaCycl1 -0.01 0.01 25
+set low -0.02
+set high 0.02
+newh1d hSigmaRaw0 ${low} ${high} 25
+newh1d hSigmaRaw1 ${low} ${high} 25
+newh1d hSigmaRun0 ${low} ${high} 25
+newh1d hSigmaRun1 ${low} ${high} 25
+newh1d hSigmaCycl0 ${low} ${high} 25
+newh1d hSigmaCycl1 ${low} ${high} 25
 
 graphicatt ""
@@ -236,23 +236,19 @@
 setaxelabels "num of cycles" "Sigma (a.u)" $axedefatt
 
-
-
-endscript
+endscript
+
 ##################################################
 defscript sigmaRaw1400a1420
 
-c++compile rebining
-c++link rebining.so dorebin
-
-
-#col 19 = onoffRaw0f14001420   Ch 0
-#col 20 = onoffRaw1f14001420  Ch 1
+## mergeAnaFiles.cc -> CalibBAODiffOnOffCycles -> onoffsurvey_[source]-[n]Cycles.ppf
+##col 19 = onoffRaw0f14001420  Ch 0
+##col 20 = onoffRaw1f14001420  Ch 1
 
 ntcol2var onoffevol 19 linCh0All
 line2vec vecCh0All $linCh0All
-
 ntcol2var onoffevol 20 linCh1All
 line2vec vecCh1All $linCh1All
 
+graphicatt ""
 set sigmaCh0 ""
 set errsigCh0 ""
@@ -260,4 +256,6 @@
 set errsigCh1 ""
 
+c++compile rebining
+c++link rebining.so dorebin
 
 foreach ipack ( $packVal )
@@ -285,5 +283,4 @@
 end
 
-
 newnt nt0 x y ey
 newnt nt1 x y ey
@@ -296,10 +293,9 @@
 set y1 ( $sigmaCh1 )
 set ey1 ( $errsigCh1 )
-	
+
 for i 0:$#x0
  line2nt nt0 $x0[i] $y0[i] $ey0[i]
  line2nt nt1 $x1[i] $y1[i] $ey1[i]
 end
-
 
 newwin 1 1
@@ -311,7 +307,23 @@
 setaxelabels "num of cycles" "Sigma (a.u)" $axedefatt
 
-
-
-endscript
+newwin 1 1
+plot2de nt1 x y 0 ey 1 "red marker=fcircle,9 notit nsta"     
+plot2de nt0 x y 0 ey 1 "same blue  marker=fcircle,9 notit nsta"
+n = ${#x0}-1
+func $y0[0]/sqrt(x) $x0[0] $x0[n]  100 "same"
+settitle "Sigma [1400,1420]MHz ${source} Ch 0 (blue) Ch 1 (red)" ' ' $defatt
+setaxelabels "num of cycles" "Sigma (a.u)" $axedefatt
+
+newwin 1 1
+n/pl onoffevol.onoffRaw0f14001420 ! ! "cpts blue notit"
+n/pl onoffevol.onoffRaw1f14001420 ! ! "cpts same red notit"
+settitle "onoffRaw [1400,1420]MHz ${source} Ch 0 (blue) Ch 1 (red)" ' ' $defatt
+newwin 1 1
+n/pl onoffevol.onoffRaw0f14001420%cycle ! ! "cpts blue notit"
+n/pl onoffevol.onoffRaw1f14001420%cycle ! ! "cpts same red notit"
+settitle "onoffRaw [1400,1420]MHz ${source} Ch 0 (blue) Ch 1 (red)" ' ' $defatt
+
+endscript
+
 ###########################################
 defscript evolAt1410a1415OffOn
@@ -410,5 +422,4 @@
 # Calibration coeff. per cycles
 
-
 graphicatt "xylimits=0,${ncycles},-0.1,0.1"
 
@@ -455,6 +466,4 @@
 setaxelabels "(a.u)" "I 1420MHz Run" $axedefatt
 
-
-
 newwin 1 1
 n/proj h1420IntCycl0 onoffevol.${nbins1420}*(onoffCycle01420-onoffCycle01420side) ! ! ! "blue cpts notit"
@@ -462,6 +471,4 @@
 settitle "ON-OFF Calib Cycle ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
 setaxelabels "(a.u)" "I 1420MHz Cycle" $axedefatt
-
-
 
 endscript
@@ -476,5 +483,6 @@
 #
 
-graphicatt ""
+# ON/OFF, OFF/OFF
+
 del sonovoff0 sonovoff1
 objaoper meanOnovOffNoCalib row 0 sonovoff0
@@ -493,5 +501,5 @@
 setaxelabels "Freq. (MHz)" "I (a.u)" $axedefatt
 
-
+# (ON-OFF)/OFF
 graphicatt "xylimits=1250,1500,-0.01,0.01"
 del sonoffovoff0 sonoffovoff1
@@ -504,13 +512,14 @@
 setaxelabels "Freq. (MHz)" "I (a.u)" $axedefatt
 
-graphicatt "xylimits=1250,1500,-0.01,0.01"
-del snocal0 snocal1
-objaoper meanNoCalib row 0 snocal0
-objaoper meanNoCalib row 1 snocal1
-newwin 1 1
-plot2d snocal0 (n/8192)*250+1250 val n>0 "blue cpts notit nsta"
-plot2d snocal1 (n/8192)*250+1250 val n>0 "red same cpts notit nsta"
-settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
-setaxelabels "Freq. (MHz)" "I (a.u)" $axedefatt
+# (ON-OFF)
+#graphicatt "xylimits=1250,1500,-0.01,0.01"
+#del snocal0 snocal1
+#objaoper meanNoCalib row 0 snocal0
+#objaoper meanNoCalib row 1 snocal1
+#newwin 1 1
+#plot2d snocal0 (n/8192)*250+1250 val n>0 "blue cpts notit nsta"
+#plot2d snocal1 (n/8192)*250+1250 val n>0 "red same cpts notit nsta"
+#settitle "Raw ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${ncycles}cycles" ' ' $defatt
+#setaxelabels "Freq. (MHz)" "I (a.u)" $axedefatt
 
 #del sruncal0 sruncal1
@@ -541,9 +550,9 @@
 #use minuscule for source label
 
-openppf ${path}/onoffsurvey_${source}-${ncycles}Cycles.ppf
-print onoffevol
-
-#openppf ${path}/rawOnOffDiff_${source}-${ncycles}Cycles.ppf
-#ls
+#openppf ${path}/onoffsurvey_${source}-${ncycles}Cycles.ppf
+#print onoffevol
+
+openppf ${path}/rawOnOffDiff_${source}-${ncycles}Cycles.ppf
+ls
 
 set defatt "font=helvetica,bold,20 fixedfonsize"
@@ -557,5 +566,5 @@
 
 
-#diffOnOff
+diffOnOff
 #evolAt1420Freq
 #evolAt1420SideFreq
