Changeset 556 for BAORadio/AmasNancay/trunk
- Timestamp:
- Oct 7, 2011, 1:42:23 PM (13 years ago)
- Location:
- BAORadio/AmasNancay/trunk
- Files:
-
- 7 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/AmasNancay/trunk/analyse.cc
r547 r556 989 989 sa_size_t nr,nc; //values read 990 990 991 //JEC 20/9/11 use mean calibration coeff upon all cycles START 991 992 string calibFileName = inputPath_+ "/" 992 993 + sourceName_ + "/" + dateOfRun_ + StringToLower(sourceName_) … … 1008 1009 } 1009 1010 1010 //JEC 20/9/11 use mean calibration coeff upon all cycles END1011 //JEC 20/9/11 use mean calibration coeff upon all cycles END 1011 1012 1012 1013 // … … 1030 1031 } //end loop mode for BAO calib 1031 1032 1032 if(debuglev_>1){ //save mean spectra BAO calibrated on file 1033 cout << "save calibrated BAO spectra" << endl; 1034 string fileName; 1035 //TO BE FIXED fileName = "./" + sourceName_ + "/" + dateOfRun_ + "_" + StringToLower(sourceName_) + "_" + "dataBAOCalib" + ".ppf"; 1036 fileName = "./dataBAOCalib_" + dateOfRun_ + "_" + StringToLower(sourceName_) + ".ppf"; 1037 1038 POutPersist fos(fileName); 1039 iSpectreEnd = spectreCollect.end(); 1040 id=0; 1041 for (iSpectre = spectreCollect.begin();iSpectre != iSpectreEnd ; ++iSpectre, ++id) { 1042 1043 tag = "specBAOCalib"; 1044 //JEC 20/9/11 modif tag to take into account Mode and Cycle number START 1045 // stringstream sid; 1046 // sid << id; 1047 // tag += sid.str(); 1048 tag += (iSpectre->first).first; 1049 stringstream sid; 1050 sid << (iSpectre->first).second; 1051 tag += sid.str(); 1052 if(debuglev_>9) { 1053 cout << "save tag<" << tag << ">" << endl; 1054 } 1055 //JEC 20/9/11 modif tag to take into account Mode and Cycle number END 1056 1057 fos << PPFNameTag(tag) << iSpectre->second; 1058 } 1059 }//end of save fits 1060 1033 cout << "save calibrated BAO spectra" << endl; 1034 string fileName; 1035 //TO BE FIXED fileName = "./" + sourceName_ + "/" + dateOfRun_ + "_" + StringToLower(sourceName_) + "_" + "dataBAOCalib" + ".ppf"; 1036 fileName = "./dataBAOCalib_" + dateOfRun_ + "_" + StringToLower(sourceName_) + ".ppf"; 1037 1038 POutPersist fos(fileName); 1039 iSpectreEnd = spectreCollect.end(); 1040 id=0; 1041 for (iSpectre = spectreCollect.begin();iSpectre != iSpectreEnd ; ++iSpectre, ++id) { 1042 1043 tag = "specBAOCalib"; 1044 //JEC 20/9/11 modif tag to take into account Mode and Cycle number START 1045 // stringstream sid; 1046 // sid << id; 1047 // tag += sid.str(); 1048 tag += (iSpectre->first).first; 1049 stringstream sid; 1050 sid << (iSpectre->first).second; 1051 tag += sid.str(); 1052 if(debuglev_>9) { 1053 cout << "save tag<" << tag << ">" << endl; 1054 } 1055 //JEC 20/9/11 modif tag to take into account Mode and Cycle number END 1056 1057 fos << PPFNameTag(tag) << iSpectre->second; 1058 } 1061 1059 1062 1060 for (iMode = modeList.begin(); iMode != modeList.end(); ++iMode) { -
BAORadio/AmasNancay/trunk/etude_onoff.pic
r547 r556 11 11 #Plots ON-OFF with all calibrations 12 12 ##################################### 13 openppf ${toppath}/${source}/ ${date}${srclower}/diffOnOff_${date}_${srclower}.ppf13 openppf ${toppath}/${source}/diffOnOff_${date}_${srclower}.ppf 14 14 15 15 … … 34 34 settitle "ON-OFF ${source}/${date} Ch 0 (blue) Ch 1 (red) Mean (black) All cycles" 35 35 setaxelabels "Freq. (MHz)" "I (Jy)" 36 37 ##################################### 38 #Examine fluctuations sigma for the combination of all cycles 39 ##################################### 40 cp sallcyclev0 specv0 41 cp sallcyclev1 specv1 42 c++compile reducing 43 c++link reducing.so doreduc 44 call doreduc 45 46 newwin 1 1 47 graphicatt "xylimits=1250,1500,-0.01,0.01" 48 del redMeanv0 49 del redMeanv1 50 objaoper reducedMeanDiffOnOff row 0 redMeanv0 51 objaoper reducedMeanDiffOnOff row 1 redMeanv1 52 plot2d redMeanv0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit" 53 plot2d redMeanv1 (n/32)*250+1250 val n>0 "same red marker=fcircle,7 nsta notit" 54 settitle "Red Mean ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles" 55 setaxelabels "Freq. (MHz)" "I (Jy)" 56 57 newwin 1 1 58 graphicatt "xylimits=1250,1500,0,0.001" 59 del redSigmav0 60 del redSigmav1 61 objaoper reducedSigmaDiffOnOff row 0 redSigmav0 62 objaoper reducedSigmaDiffOnOff row 1 redSigmav1 63 plot2d redSigmav0 (n/32)*250+1250 val n>0 "blue marker=fcircle,7 nsta notit" 64 plot2d redSigmav1 (n/32)*250+1250 val n>0 "same red marker=fcircle,7 nsta notit" 65 settitle "ON-OFF ${source} Ch 0 (blue) Ch 1 (red) ${tmpvec.sum} cycles" 66 setaxelabels "Freq. (MHz)" "I (Jy)" 67 36 68 37 69 ##################################### … … 70 102 # Plots RAW no calibration at all 71 103 ##################################### 72 openppf ${toppath}/${source}/ ${date}${srclower}/dataRaw_${date}_${srclower}.ppf104 openppf ${toppath}/${source}/dataRaw_${date}_${srclower}.ppf 73 105 newwin 2 2 74 106 graphicatt "xylimits=1250,1500,0.95,1.05" … … 141 173 # Plots BAO calibration included 142 174 ##################################### 143 openppf ${toppath}/${source}/ ${date}${srclower}/dataBAOCalib_${date}_${srclower}.ppf175 openppf ${toppath}/${source}/dataBAOCalib_${date}_${srclower}.ppf 144 176 newwin 2 2 145 177 #graphicatt "xylimits=1250,1500,0.95,1.05" … … 214 246 # Plots BAO+RT calibration included 215 247 ##################################### 216 openppf ${toppath}/${source}/ ${date}${srclower}/dataBAORTCalib_${date}_${srclower}.ppf248 openppf ${toppath}/${source}/dataBAORTCalib_${date}_${srclower}.ppf 217 249 newwin 2 2 218 250 #graphicatt "xylimits=1250,1500,0.95,1.05" -
BAORadio/AmasNancay/trunk/mergeRawOnOff.pic
r554 r556 67 67 c++link reducing.so doreduc 68 68 69 69 cp specONOFFv0 specv0 70 cp specONOFFv1 specv1 70 71 call doreduc 71 72 -
BAORadio/AmasNancay/trunk/plotDiffOnOff.pic
r553 r556 51 51 setaxelabels "Freq. (MHz)" "Sigma[(ON-OFF)[r,c]/Gain[r]] Rebin(${nFreqBin})" $defatt 52 52 53 ###### 53 54 else 55 ###### 54 56 55 57 openppf medianDiffOnOffRaw_${source}-${ncycles}Cycles.ppf … … 93 95 94 96 ##Normalized General Median 95 del s0s196 objaoper medianNorm row 0 s097 objaoper medianNorm row 1 s197 del ngms0 ngms1 98 objaoper medianNorm row 0 ngms0 99 objaoper medianNorm row 1 ngms1 98 100 graphicatt "xylimits=1250,1500,-2,2" 99 101 newwin 1 1 100 plot2d s0 (n/8192)*250+1250 val n>0 "cpts blue nsta notit"101 plot2d s1 (n/8192)*250+1250 val n>0 "same cpts red nsta notit"102 plot2d ngms0 (n/8192)*250+1250 val n>0 "cpts blue nsta notit" 103 plot2d ngms1 (n/8192)*250+1250 val n>0 "same cpts red nsta notit" 102 104 settitle "$source (${ncycles} cycles) Ch 0 (blue) Ch 1 (red)" ' ' $defatt 103 105 setaxelabels "Freq. (MHz)" "Norm Median[(ON-OFF)[r,c]/Gain[r]]" $defatt 104 106 107 del prod 108 c++exec TVector<r_4>prod(ngms0.NElts(),BaseArray::RowVector); prod=ngms0&&ngms1;KeepObj(prod); 109 newwin 1 1 110 plot2d prod (n/8192)*250+1250 val n>0 "cpts blue nsta notit" 111 settitle "$source (${ncycles} cycles)" ' ' $defatt 112 setaxelabels "Freq. (MHz)" "Product Norm Median[(ON-OFF)[r,c]/Gain[r]]" $defatt 105 113 106 114 -
BAORadio/AmasNancay/trunk/proc_rawonoff.sh
r555 r556 86 86 $ECHO "FATAL: You have forgotten to select the type option (-type)" 87 87 exit 1 88 fi 89 88 else 89 offtype=`$ECHO ${typeofproc} | $GREP -i OFF | $WC -l` 90 ontype=`$ECHO ${typeofproc} | $GREP -i ON | $WC -l` 91 if [ "<${offtype}>" = "<1>" -a "<${ontype}>" = "<0>" ]; then 92 datatype="OFF" 93 elif [ "<${offtype}>" = "<0>" -a "<${ontype}>" = "<1>" ]; then 94 datatype="ON" 95 else 96 $ECHO "FATAL: not supported: -type ${typeofproc}" 97 exit 1 98 fi 99 fi 90 100 91 101 … … 210 220 #JEC 29/9/11 avoid finished stuff 211 221 #$RM -f ${tmppublicpath}/select.finished 212 ${scriptpath}/select.sh ${scaFileSummarized} ${dirFiberfile} ${ typeofproc} | $GREP "^#[0-9]" | $SED "s/^#//" > $headerFileSelected222 ${scriptpath}/select.sh ${scaFileSummarized} ${dirFiberfile} ${datatype} | $GREP "^#[0-9]" | $SED "s/^#//" > $headerFileSelected 213 223 #while [ ! -f "${tmppublicpath}/select.finished" ]; do 214 224 # $ECHO "INFO (${scriptName}): waiting for ${tmppublicpath}/select.finished" … … 308 318 $ECHO "process signal files for OFF phases (MEAN)" 309 319 ingain="-gain gain_${dateSelected}_${srclower}.fits" 310 freqfilter="-freqfilter 16" 311 nwinmean="5" 312 tspwin="5120" 320 nwinmean="25000" 321 tspwin="1" 313 322 dirName="Off" 314 323 cyclebasename="meancycle" … … 322 331 $ECHO "process signal files for OFF phases (MEAN)" 323 332 ingain="-gain gain_${dateSelected}_${srclower}.fits" 324 freqfilter="-freqfilter 16" 325 nwinmean="5" 326 tspwin="5120" 333 nwinmean="25000" 334 tspwin="1" 327 335 dirName="On" 328 336 cyclebasename="meancycle" … … 558 566 559 567 #Note: here act=gain means only that specmfib will use median-like algorithms (not only for gains...) 560 $prg -act gain$forceSingle $freqfilter -prt $prtlevel -out ${outDir} -nmean $nwinmean $ingain $tmproc -tspwin ${tspwin},0,0 -in $infiles ${fibfile}568 $prg -act ${action} $forceSingle $freqfilter -prt $prtlevel -out ${outDir} -nmean $nwinmean $ingain $tmproc -tspwin ${tspwin},0,0 -in $infiles ${fibfile} 561 569 562 570 $ECHO ${outDir} -
BAORadio/AmasNancay/trunk/reducing.cc
r547 r556 100 100 string ___nomobj; 101 101 102 ___nomobj = "spec ONOFFv0";103 TVector< r_4 > * ___spec ONOFFv0 = dynamic_cast< TVector< r_4 > * >(omg.GetObj(___nomobj));104 if(___spec ONOFFv0==NULL) throw NullPtrError("CxxExecutor::PutObject: Non existing object specONOFFv0... please update file");105 TVector< r_4 > & spec ONOFFv0 = (*___specONOFFv0);102 ___nomobj = "specv0"; 103 TVector< r_4 > * ___specv0 = dynamic_cast< TVector< r_4 > * >(omg.GetObj(___nomobj)); 104 if(___specv0==NULL) throw NullPtrError("CxxExecutor::PutObject: Non existing object specv0... please update file"); 105 TVector< r_4 > & specv0 = (*___specv0); 106 106 107 ___nomobj = "spec ONOFFv1";108 TVector< r_4 > * ___spec ONOFFv1 = dynamic_cast< TVector< r_4 > * >(omg.GetObj(___nomobj));109 if(___spec ONOFFv1==NULL) throw NullPtrError("CxxExecutor::PutObject: Non existing object specONOFFv1... please update file");110 TVector< r_4 > & spec ONOFFv1 = (*___specONOFFv1);107 ___nomobj = "specv1"; 108 TVector< r_4 > * ___specv1 = dynamic_cast< TVector< r_4 > * >(omg.GetObj(___nomobj)); 109 if(___specv1==NULL) throw NullPtrError("CxxExecutor::PutObject: Non existing object specv1... please update file"); 110 TVector< r_4 > & specv1 = (*___specv1); 111 111 112 112 … … 119 119 sa_size_t NUMBER_OF_FREQ = 8192; 120 120 TMatrix<r_4> specMtxInPut(NUMBER_OF_CHANNELS,NUMBER_OF_FREQ); 121 specMtxInPut.Row(0)=spec ONOFFv0;122 specMtxInPut.Row(1)=spec ONOFFv1;121 specMtxInPut.Row(0)=specv0; 122 specMtxInPut.Row(1)=specv1; 123 123 124 124 //JEC 22/9/11 Mean & Sigma in 32-bins size START -
BAORadio/AmasNancay/trunk/submit2bqs-rawonoffmaker.sh
r555 r556 28 28 #action: gain|mspec (gain: gain-like doucble median filtering 29 29 # mspec: mean+sigma wo filetring) 30 action=" gain"30 action="-act gain" 31 31 sourceRadio= 32 32 dateSelected=
Note: See TracChangeset
for help on using the changeset viewer.