Index: /BAORadio/AmasNancay/trunk/analyse.cc
===================================================================
--- /BAORadio/AmasNancay/trunk/analyse.cc	(revision 555)
+++ /BAORadio/AmasNancay/trunk/analyse.cc	(revision 556)
@@ -989,4 +989,5 @@
     sa_size_t nr,nc; //values read 
     
+    //JEC 20/9/11 use mean calibration coeff upon all cycles START
     string calibFileName = inputPath_+ "/" 
       + sourceName_ + "/" + dateOfRun_ + StringToLower(sourceName_) 
@@ -1008,5 +1009,5 @@
     }
 
-//JEC 20/9/11 use mean calibration coeff upon all cycles END
+    //JEC 20/9/11 use mean calibration coeff upon all cycles END
 
     //
@@ -1030,33 +1031,30 @@
   } //end loop mode for BAO calib
 
-  if(debuglev_>1){ //save mean spectra BAO calibrated on file
-    cout << "save calibrated BAO spectra" << endl;
-    string fileName;
-    //TO BE FIXED    fileName = "./" + sourceName_ + "/" + dateOfRun_ + "_" + StringToLower(sourceName_) + "_" + "dataBAOCalib" + ".ppf";
-    fileName = "./dataBAOCalib_" + dateOfRun_ + "_" + StringToLower(sourceName_) + ".ppf";
-
-    POutPersist fos(fileName);
-    iSpectreEnd = spectreCollect.end();
-    id=0;
-    for (iSpectre = spectreCollect.begin();iSpectre != iSpectreEnd ; ++iSpectre, ++id) {
-
-      tag = "specBAOCalib";
-      //JEC 20/9/11 modif tag to take into account Mode and Cycle number START
-//       stringstream sid;
-//       sid << id;
-//       tag += sid.str();
-      tag += (iSpectre->first).first;
-      stringstream sid;
-      sid << (iSpectre->first).second;
-      tag += sid.str();
-      if(debuglev_>9) {
- 	cout << "save tag<" << tag << ">" << endl;
-      }
-      //JEC 20/9/11 modif tag to take into account Mode and Cycle number END
-
-      fos << PPFNameTag(tag) << iSpectre->second;
-    }
-  }//end of save fits
-
+  cout << "save calibrated BAO spectra" << endl;
+  string fileName;
+  //TO BE FIXED    fileName = "./" + sourceName_ + "/" + dateOfRun_ + "_" + StringToLower(sourceName_) + "_" + "dataBAOCalib" + ".ppf";
+  fileName = "./dataBAOCalib_" + dateOfRun_ + "_" + StringToLower(sourceName_) + ".ppf";
+  
+  POutPersist fos(fileName);
+  iSpectreEnd = spectreCollect.end();
+  id=0;
+  for (iSpectre = spectreCollect.begin();iSpectre != iSpectreEnd ; ++iSpectre, ++id) {
+    
+    tag = "specBAOCalib";
+    //JEC 20/9/11 modif tag to take into account Mode and Cycle number START
+    //       stringstream sid;
+    //       sid << id;
+    //       tag += sid.str();
+    tag += (iSpectre->first).first;
+    stringstream sid;
+    sid << (iSpectre->first).second;
+    tag += sid.str();
+    if(debuglev_>9) {
+      cout << "save tag<" << tag << ">" << endl;
+    }
+    //JEC 20/9/11 modif tag to take into account Mode and Cycle number END
+    
+    fos << PPFNameTag(tag) << iSpectre->second;
+  }
   
   for (iMode = modeList.begin(); iMode != modeList.end(); ++iMode) {
Index: /BAORadio/AmasNancay/trunk/etude_onoff.pic
===================================================================
--- /BAORadio/AmasNancay/trunk/etude_onoff.pic	(revision 555)
+++ /BAORadio/AmasNancay/trunk/etude_onoff.pic	(revision 556)
@@ -11,5 +11,5 @@
 #Plots ON-OFF with all calibrations 
 #####################################
-openppf ${toppath}/${source}/${date}${srclower}/diffOnOff_${date}_${srclower}.ppf
+openppf ${toppath}/${source}/diffOnOff_${date}_${srclower}.ppf
 
 
@@ -34,4 +34,36 @@
 settitle "ON-OFF  ${source}/${date} Ch 0 (blue) Ch 1 (red) Mean (black)  All cycles"
 setaxelabels "Freq. (MHz)" "I (Jy)"
+
+#####################################
+#Examine fluctuations sigma for the combination of all cycles
+#####################################
+cp sallcyclev0 specv0
+cp sallcyclev1 specv1
+c++compile reducing        
+c++link reducing.so doreduc
+call doreduc
+
+newwin 1 1
+graphicatt "xylimits=1250,1500,-0.01,0.01"
+ del redMeanv0                                                                      
+ del redMeanv1                                                                      
+ objaoper reducedMeanDiffOnOff row 0 redMeanv0                                      
+ objaoper reducedMeanDiffOnOff row 1 redMeanv1                                      
+ plot2d redMeanv0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit"        
+ plot2d redMeanv1 (n/32)*250+1250 val n>0 "same red marker=fcircle,7 nsta notit"
+settitle "Red Mean ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles"
+setaxelabels "Freq. (MHz)" "I (Jy)"
+
+newwin 1 1
+graphicatt "xylimits=1250,1500,0,0.001"
+ del redSigmav0                                                                      
+ del redSigmav1                                                                      
+ objaoper reducedSigmaDiffOnOff row 0 redSigmav0                                      
+ objaoper reducedSigmaDiffOnOff row 1 redSigmav1                                      
+ plot2d redSigmav0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit"        
+ plot2d redSigmav1 (n/32)*250+1250 val n>0 "same red marker=fcircle,7 nsta notit"
+settitle "ON-OFF  ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles"
+setaxelabels "Freq. (MHz)" "I (Jy)"
+
 
 #####################################
@@ -70,5 +102,5 @@
 # Plots RAW no calibration at all
 #####################################
-openppf ${toppath}/${source}/${date}${srclower}/dataRaw_${date}_${srclower}.ppf
+openppf ${toppath}/${source}/dataRaw_${date}_${srclower}.ppf
 newwin 2 2
 graphicatt "xylimits=1250,1500,0.95,1.05"
@@ -141,5 +173,5 @@
 # Plots BAO calibration included
 #####################################
-openppf ${toppath}/${source}/${date}${srclower}/dataBAOCalib_${date}_${srclower}.ppf
+openppf ${toppath}/${source}/dataBAOCalib_${date}_${srclower}.ppf
 newwin 2 2
 #graphicatt "xylimits=1250,1500,0.95,1.05"
@@ -214,5 +246,5 @@
 # Plots BAO+RT calibration included
 #####################################
-openppf ${toppath}/${source}/${date}${srclower}/dataBAORTCalib_${date}_${srclower}.ppf
+openppf ${toppath}/${source}/dataBAORTCalib_${date}_${srclower}.ppf
 newwin 2 2
 #graphicatt "xylimits=1250,1500,0.95,1.05"
Index: /BAORadio/AmasNancay/trunk/getAnalyseFiles.sh
===================================================================
--- /BAORadio/AmasNancay/trunk/getAnalyseFiles.sh	(revision 556)
+++ /BAORadio/AmasNancay/trunk/getAnalyseFiles.sh	(revision 556)
@@ -0,0 +1,140 @@
+#!/bin/sh -xvf
+#Perform the ON-OFF analysis
+DATE=/bin/date
+GREP=/bin/grep
+AWK=/bin/awk
+ECHO=/bin/echo
+WC=/usr/bin/wc
+CAT=/bin/cat
+PRINTF=/usr/bin/printf
+FIND=/usr/bin/find
+MKDIR=/bin/mkdir
+XARGS=/usr/bin/xargs
+SORT=/bin/sort
+RM=/bin/rm
+TR=/usr/bin/tr
+CP=/bin/cp
+LS=/bin/ls
+CHMOD=/bin/chmod
+
+DefaultIFS=$' \t\n'
+IFS=$DefaultIFS
+
+#set Irods environment    
+. /usr/local/shared/bin/irods_env.sh -noverbose
+
+scriptName="`basename $0`"
+$ECHO "Processing script ${scriptName} at `date`"
+#which source to analyse
+
+#Process cmd line args: the -src option is mandatory (source name as Abell85)
+sourceRadio=
+dateSelected=
+simulationMode=Off
+while [ $# -gt 0 ]
+  do
+  case "$1" in
+      -src)  sourceRadio=$2;    shift;;
+      -date) dateSelected=$2;     shift;;
+      -sim)  simulationMode=On;;
+      -h)
+      echo >&2 \
+	  "usage: $0 -src souce -date YYYYMMDD [-sim to trig simulation mode]"
+      exit 1;;
+      *)  break;;	# terminate while loop
+  esac
+  shift
+done
+
+
+if [ ${simulationMode} = "On" ]; then
+    $ECHO "INFO ${scriptName} running in SIMUL mode"
+fi
+
+if [ "<${sourceRadio}>" = "<>" ]; then
+    $ECHO "FATAL: You have forgotten to select the source option (-src)"
+    exit 1
+fi
+
+case ${sourceRadio} in
+    Abell85) $ECHO "INFO (${scriptName}): process ${sourceRadio}";;
+    Abell2440) $ECHO "INFO (${scriptName}): process ${sourceRadio}";;
+    Abell1205) $ECHO "INFO (${scriptName}): process ${sourceRadio}";;
+    *) ECHO "FATAL (${scriptName}): process ${sourceRadio} not yet foreseen"
+    exit 1;;
+esac
+
+srclower=`${ECHO} ${sourceRadio} | ${TR} "[:upper:]" "[:lower:]" `
+
+#Path to public backupable path
+publicpath="/afs/in2p3.fr/home/c/campagne/public"
+
+
+#temporary files to synchronize scripts
+tmppublicpath=${TMPPUBLICPATH}
+#wakeup the NFS disk
+$LS -l ${tmppublicpath} > /dev/null
+
+#Path where the job will do temporary IO
+if [ ${ENVIRONMENT} = "INTERACTIVE" ]; then
+    iojobpath="/sps/baoradio/AmasNancay/JEC"
+    $MKDIR -p $iojobpath
+else
+    $ECHO "FATAL (${scriptName}): environment is ${ENVIRONMENT} not allowed"
+    exit 1
+fi
+cd ${iojobpath}
+
+localpath="${sourceRadio}"
+$MKDIR -p ./${localpath}
+cd ./${localpath}
+
+
+#Path of the utility scripts
+scriptpath="/afs/in2p3.fr/home/c/campagne/private/work/AmasNancay"
+
+OUT1=${publicpath}/baodaqstatus-current.txt
+if [ ! -e ${OUT1}  -o ! -r ${OUT1} ]; then
+    $ECHO "FATAL (${scriptName}): ${OUT1} has a problem"
+    exit 1
+fi
+
+
+
+$ECHO "You have selected sourceRadio = ${sourceRadio} [date = ${dateSelected}]"
+tableau=( `$GREP -i "${dateSelected}${srclower}" ${OUT1} | $AWK '( NF==4 ) { print $2 }' ` )
+IFS='
+' 
+tableau=( $( $PRINTF "%s\n" "${tableau[@]}" | $AWK 'x[$0]++ == 0' ) )
+IFS=$DefaultIFS
+
+$ECHO "We are in directory `pwd`"
+
+for i in ${tableau[@]}
+  do
+#
+  
+  $ECHO "DEBUG: (${scriptName}) irods root dir $i"
+#  dateDAQ=`$ECHO ${i} | $AWK '{split($0,a,"/"); print a[6];}' | $AWK "{sub(/${srclower}/,\"\"); print}"`
+
+  file=`ils ${i} 2>&1 | $GREP -i "diffOnOffRAw_.*\.ppf"`
+  file=`$ECHO $file`
+  if [ "<${file}>" != "<>" ]; then
+      if [ ! -e ${file}  ]; then
+	  iget -f -v ${i}/${file} 
+      fi
+  fi
+
+  file=`ils ${i} 2>&1 | $GREP -i "dataRAw_.*\.ppf"`
+  file=`$ECHO $file`
+  if [ "<${file}>" != "<>" ]; then
+#      if [ ! -e ${file}  ]; then
+	  iget -f -v ${i}/${file} 
+#      fi
+  fi
+
+
+  
+done
+
+exit 0
Index: ORadio/AmasNancay/trunk/getDiffRawOnOff.sh
===================================================================
--- /BAORadio/AmasNancay/trunk/getDiffRawOnOff.sh	(revision 555)
+++ 	(revision )
@@ -1,140 +1,0 @@
-#!/bin/sh -xvf
-#Perform the ON-OFF analysis
-DATE=/bin/date
-GREP=/bin/grep
-AWK=/bin/awk
-ECHO=/bin/echo
-WC=/usr/bin/wc
-CAT=/bin/cat
-PRINTF=/usr/bin/printf
-FIND=/usr/bin/find
-MKDIR=/bin/mkdir
-XARGS=/usr/bin/xargs
-SORT=/bin/sort
-RM=/bin/rm
-TR=/usr/bin/tr
-CP=/bin/cp
-LS=/bin/ls
-CHMOD=/bin/chmod
-
-DefaultIFS=$' \t\n'
-IFS=$DefaultIFS
-
-#set Irods environment    
-. /usr/local/shared/bin/irods_env.sh -noverbose
-
-scriptName="`basename $0`"
-$ECHO "Processing script ${scriptName} at `date`"
-#which source to analyse
-
-#Process cmd line args: the -src option is mandatory (source name as Abell85)
-sourceRadio=
-dateSelected=
-simulationMode=Off
-while [ $# -gt 0 ]
-  do
-  case "$1" in
-      -src)  sourceRadio=$2;    shift;;
-      -date) dateSelected=$2;     shift;;
-      -sim)  simulationMode=On;;
-      -h)
-      echo >&2 \
-	  "usage: $0 -src souce -date YYYYMMDD [-sim to trig simulation mode]"
-      exit 1;;
-      *)  break;;	# terminate while loop
-  esac
-  shift
-done
-
-
-if [ ${simulationMode} = "On" ]; then
-    $ECHO "INFO ${scriptName} running in SIMUL mode"
-fi
-
-if [ "<${sourceRadio}>" = "<>" ]; then
-    $ECHO "FATAL: You have forgotten to select the source option (-src)"
-    exit 1
-fi
-
-case ${sourceRadio} in
-    Abell85) $ECHO "INFO (${scriptName}): process ${sourceRadio}";;
-    Abell2440) $ECHO "INFO (${scriptName}): process ${sourceRadio}";;
-    Abell1205) $ECHO "INFO (${scriptName}): process ${sourceRadio}";;
-    *) ECHO "FATAL (${scriptName}): process ${sourceRadio} not yet foreseen"
-    exit 1;;
-esac
-
-srclower=`${ECHO} ${sourceRadio} | ${TR} "[:upper:]" "[:lower:]" `
-
-#Path to public backupable path
-publicpath="/afs/in2p3.fr/home/c/campagne/public"
-
-
-#temporary files to synchronize scripts
-tmppublicpath=${TMPPUBLICPATH}
-#wakeup the NFS disk
-$LS -l ${tmppublicpath} > /dev/null
-
-#Path where the job will do temporary IO
-if [ ${ENVIRONMENT} = "INTERACTIVE" ]; then
-    iojobpath="/sps/baoradio/AmasNancay/JEC"
-    $MKDIR -p $iojobpath
-else
-    $ECHO "FATAL (${scriptName}): environment is ${ENVIRONMENT} not allowed"
-    exit 1
-fi
-cd ${iojobpath}
-
-localpath="${sourceRadio}"
-$MKDIR -p ./${localpath}
-cd ./${localpath}
-
-
-#Path of the utility scripts
-scriptpath="/afs/in2p3.fr/home/c/campagne/private/work/AmasNancay"
-
-OUT1=${publicpath}/baodaqstatus-current.txt
-if [ ! -e ${OUT1}  -o ! -r ${OUT1} ]; then
-    $ECHO "FATAL (${scriptName}): ${OUT1} has a problem"
-    exit 1
-fi
-
-
-
-$ECHO "You have selected sourceRadio = ${sourceRadio} [date = ${dateSelected}]"
-tableau=( `$GREP -i "${dateSelected}${srclower}" ${OUT1} | $AWK '( NF==4 ) { print $2 }' ` )
-IFS='
-' 
-tableau=( $( $PRINTF "%s\n" "${tableau[@]}" | $AWK 'x[$0]++ == 0' ) )
-IFS=$DefaultIFS
-
-$ECHO "We are in directory `pwd`"
-
-for i in ${tableau[@]}
-  do
-#
-  
-  $ECHO "DEBUG: (${scriptName}) irods root dir $i"
-#  dateDAQ=`$ECHO ${i} | $AWK '{split($0,a,"/"); print a[6];}' | $AWK "{sub(/${srclower}/,\"\"); print}"`
-
-  file=`ils ${i} 2>&1 | $GREP -i "diffOnOffRAw_.*\.ppf"`
-  file=`$ECHO $file`
-  if [ "<${file}>" != "<>" ]; then
-      if [ ! -e ${file}  ]; then
-	  iget -f -v ${i}/${file} 
-      fi
-  fi
-
-  file=`ils ${i} 2>&1 | $GREP -i "dataRAw_.*\.ppf"`
-  file=`$ECHO $file`
-  if [ "<${file}>" != "<>" ]; then
-#      if [ ! -e ${file}  ]; then
-	  iget -f -v ${i}/${file} 
-#      fi
-  fi
-
-
-  
-done
-
-exit 0
Index: /BAORadio/AmasNancay/trunk/mergeRawOnOff.pic
===================================================================
--- /BAORadio/AmasNancay/trunk/mergeRawOnOff.pic	(revision 555)
+++ /BAORadio/AmasNancay/trunk/mergeRawOnOff.pic	(revision 556)
@@ -67,5 +67,6 @@
 c++link reducing.so doreduc
 
-
+cp specONOFFv0 specv0
+cp specONOFFv1 specv1
 call doreduc
 
Index: /BAORadio/AmasNancay/trunk/plotDiffOnOff.pic
===================================================================
--- /BAORadio/AmasNancay/trunk/plotDiffOnOff.pic	(revision 555)
+++ /BAORadio/AmasNancay/trunk/plotDiffOnOff.pic	(revision 556)
@@ -51,5 +51,7 @@
 setaxelabels "Freq. (MHz)" "Sigma[(ON-OFF)[r,c]/Gain[r]] Rebin(${nFreqBin})" $defatt
 
+######
 else
+######
 
 openppf medianDiffOnOffRaw_${source}-${ncycles}Cycles.ppf
@@ -93,14 +95,20 @@
 
 ##Normalized General Median
-del s0 s1
-objaoper medianNorm row 0 s0
-objaoper medianNorm row 1 s1
+del ngms0 ngms1
+objaoper medianNorm row 0 ngms0
+objaoper medianNorm row 1 ngms1
 graphicatt "xylimits=1250,1500,-2,2"
 newwin 1 1
-plot2d s0 (n/8192)*250+1250 val n>0 "cpts blue nsta notit"
-plot2d s1 (n/8192)*250+1250 val n>0 "same cpts red nsta notit"
+plot2d ngms0 (n/8192)*250+1250 val n>0 "cpts blue nsta notit"
+plot2d ngms1 (n/8192)*250+1250 val n>0 "same cpts red nsta notit"
 settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt
 setaxelabels "Freq. (MHz)" "Norm Median[(ON-OFF)[r,c]/Gain[r]]"  $defatt
 
+del prod
+c++exec TVector<r_4>prod(ngms0.NElts(),BaseArray::RowVector); prod=ngms0&&ngms1;KeepObj(prod);
+newwin 1 1
+plot2d prod (n/8192)*250+1250 val n>0 "cpts blue nsta notit"
+settitle "$source (${ncycles} cycles)" ' ' $defatt
+setaxelabels "Freq. (MHz)" "Product Norm Median[(ON-OFF)[r,c]/Gain[r]]"  $defatt
  
 
Index: /BAORadio/AmasNancay/trunk/proc_rawonoff.sh
===================================================================
--- /BAORadio/AmasNancay/trunk/proc_rawonoff.sh	(revision 555)
+++ /BAORadio/AmasNancay/trunk/proc_rawonoff.sh	(revision 556)
@@ -86,6 +86,16 @@
     $ECHO "FATAL: You have forgotten to select the type option (-type)"
     exit 1
-fi
-
+else
+    offtype=`$ECHO ${typeofproc} | $GREP -i OFF | $WC -l`
+    ontype=`$ECHO ${typeofproc} | $GREP -i ON | $WC -l`
+    if [ "<${offtype}>" = "<1>" -a  "<${ontype}>" = "<0>" ]; then
+	datatype="OFF"
+    elif [ "<${offtype}>" = "<0>" -a  "<${ontype}>" = "<1>" ]; then
+	datatype="ON"
+    else
+	$ECHO "FATAL: not supported: -type ${typeofproc}"
+	exit 1
+    fi
+fi
 
 
@@ -210,5 +220,5 @@
 #JEC 29/9/11 avoid finished stuff
 #$RM -f ${tmppublicpath}/select.finished
-${scriptpath}/select.sh ${scaFileSummarized} ${dirFiberfile} ${typeofproc} | $GREP "^#[0-9]" | $SED "s/^#//" > $headerFileSelected
+${scriptpath}/select.sh ${scaFileSummarized} ${dirFiberfile} ${datatype} | $GREP "^#[0-9]" | $SED "s/^#//" > $headerFileSelected
 #while [ ! -f "${tmppublicpath}/select.finished" ]; do
 #    $ECHO "INFO (${scriptName}): waiting for ${tmppublicpath}/select.finished"
@@ -308,7 +318,6 @@
       $ECHO "process signal files for OFF phases (MEAN)"
       ingain="-gain gain_${dateSelected}_${srclower}.fits"
-      freqfilter="-freqfilter 16"
-      nwinmean="5"
-      tspwin="5120"
+      nwinmean="25000"
+      tspwin="1"
       dirName="Off"
       cyclebasename="meancycle"
@@ -322,7 +331,6 @@
       $ECHO "process signal files for OFF phases (MEAN)"
       ingain="-gain gain_${dateSelected}_${srclower}.fits"
-      freqfilter="-freqfilter 16"
-      nwinmean="5"
-      tspwin="5120"
+      nwinmean="25000"
+      tspwin="1"
       dirName="On"
       cyclebasename="meancycle"
@@ -558,5 +566,5 @@
 
 #Note: here act=gain means only that specmfib will use median-like algorithms (not only for gains...)
-    $prg -act gain $forceSingle $freqfilter  -prt $prtlevel -out ${outDir} -nmean $nwinmean $ingain $tmproc -tspwin ${tspwin},0,0 -in $infiles ${fibfile}
+    $prg -act ${action} $forceSingle $freqfilter  -prt $prtlevel -out ${outDir} -nmean $nwinmean $ingain $tmproc -tspwin ${tspwin},0,0 -in $infiles ${fibfile}
 
     $ECHO    ${outDir}
Index: /BAORadio/AmasNancay/trunk/reducing.cc
===================================================================
--- /BAORadio/AmasNancay/trunk/reducing.cc	(revision 555)
+++ /BAORadio/AmasNancay/trunk/reducing.cc	(revision 556)
@@ -100,13 +100,13 @@
 string ___nomobj;
 
-___nomobj = "specONOFFv0";
-TVector< r_4 > * ___specONOFFv0 = dynamic_cast< TVector< r_4 >  * >(omg.GetObj(___nomobj));
-if(___specONOFFv0==NULL) throw NullPtrError("CxxExecutor::PutObject: Non existing object specONOFFv0... please update file");
-TVector< r_4 > & specONOFFv0 = (*___specONOFFv0);
+___nomobj = "specv0";
+TVector< r_4 > * ___specv0 = dynamic_cast< TVector< r_4 >  * >(omg.GetObj(___nomobj));
+if(___specv0==NULL) throw NullPtrError("CxxExecutor::PutObject: Non existing object specv0... please update file");
+TVector< r_4 > & specv0 = (*___specv0);
 
-___nomobj = "specONOFFv1";
-TVector< r_4 > * ___specONOFFv1 = dynamic_cast< TVector< r_4 >  * >(omg.GetObj(___nomobj));
-if(___specONOFFv1==NULL) throw NullPtrError("CxxExecutor::PutObject: Non existing object specONOFFv1... please update file");
-TVector< r_4 > & specONOFFv1 = (*___specONOFFv1);
+___nomobj = "specv1";
+TVector< r_4 > * ___specv1 = dynamic_cast< TVector< r_4 >  * >(omg.GetObj(___nomobj));
+if(___specv1==NULL) throw NullPtrError("CxxExecutor::PutObject: Non existing object specv1... please update file");
+TVector< r_4 > & specv1 = (*___specv1);
 
 
@@ -119,6 +119,6 @@
  sa_size_t NUMBER_OF_FREQ = 8192;
  TMatrix<r_4> specMtxInPut(NUMBER_OF_CHANNELS,NUMBER_OF_FREQ);
- specMtxInPut.Row(0)=specONOFFv0;
- specMtxInPut.Row(1)=specONOFFv1;
+ specMtxInPut.Row(0)=specv0;
+ specMtxInPut.Row(1)=specv1;
 
  //JEC 22/9/11 Mean & Sigma in 32-bins size START
Index: /BAORadio/AmasNancay/trunk/submit2bqs-rawonoffmaker.sh
===================================================================
--- /BAORadio/AmasNancay/trunk/submit2bqs-rawonoffmaker.sh	(revision 555)
+++ /BAORadio/AmasNancay/trunk/submit2bqs-rawonoffmaker.sh	(revision 556)
@@ -28,5 +28,5 @@
 #action: gain|mspec (gain: gain-like doucble median filtering
 #                   mspec: mean+sigma wo filetring)
-action="gain"
+action="-act gain"
 sourceRadio=
 dateSelected=
