Changeset 542 for BAORadio/AmasNancay
- Timestamp:
- Oct 3, 2011, 6:53:43 PM (13 years ago)
- Location:
- BAORadio/AmasNancay
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
BAORadio/AmasNancay/anarawonoffmaker.sh
r540 r542 82 82 iojobpath="/sps/baoradio/AmasNancay/JEC" 83 83 $MKDIR -p $iojobpath 84 $ECHO "Usage in INTERACTIVE may be destructive... To be used with great care !!!!" 85 exit 0; 84 86 elif [ ${ENVIRONMENT} = "BATCH" ] ; then 85 87 iojobpath=${TMPBATCH} -
BAORadio/AmasNancay/calibmaker.sh
r540 r542 84 84 iojobpath="/sps/baoradio/AmasNancay/JEC" 85 85 $MKDIR -p $iojobpath 86 $ECHO "Usage in INTERACTIVE may be destructive... To be used with great care !!!!" 87 exit 0; 86 88 elif [ ${ENVIRONMENT} = "BATCH" ] ; then 87 89 iojobpath=${TMPBATCH} … … 140 142 cd ${topDir} 141 143 $LS | $XARGS -i $RM -rf {} 144 142 145 143 146 $ECHO "DEBUG: (${scriptName}) irods root dir $i" -
BAORadio/AmasNancay/gainmaker.sh
r540 r542 82 82 iojobpath="/sps/baoradio/AmasNancay/JEC" 83 83 $MKDIR -p $iojobpath 84 $ECHO "Usage in INTERACTIVE may be destructive... To be used with great care !!!!" 85 exit 0; 84 86 elif [ ${ENVIRONMENT} = "BATCH" ] ; then 85 87 iojobpath=${TMPBATCH} -
BAORadio/AmasNancay/mergeRawOnOff.cc
r541 r542 37 37 #include "ppersist.h" 38 38 39 //----------------------------------------------- 40 const sa_size_t NUMBER_OF_CHANNELS = 2; 41 const sa_size_t NUMBER_OF_FREQ = 8192; 42 const r_4 LOWER_FREQUENCY = 1250.0; //MHz 43 const r_4 TOTAL_BANDWIDTH = 250.0; //MHz 39 44 //----------------------------------------------- 40 45 char *regexp (const char *string, const char *patrn, int *begin, int *end) { … … 61 66 62 67 struct Param { 63 stringdebuglev_;68 int debuglev_; 64 69 string inPath_; 65 70 string outPath_; … … 154 159 directoryName = para.inPath_ + "/" + para.sourceName_; 155 160 161 //Make the listing of the directory 156 162 listOfFiles = ListOfFileInDir(directoryName,para.ppfFile_); 157 163 … … 159 165 iFileEnd = listOfFiles.end(); 160 166 161 StringMatch match("specONOFFRaw[0-9]+"); 167 StringMatch match("specONOFFRaw[0-9]+"); //Tag of the PPF objects 168 TMatrix<r_4> sumOfSpectra(NUMBER_OF_CHANNELS,NUMBER_OF_FREQ); 169 uint_4 nSpectra=0; 170 //Loop on files 162 171 for (iFile = listOfFiles.begin(); iFile != iFileEnd; ++iFile) { 163 cout << "load file <" << *iFile << ">" << endl; 172 if (para.debuglev_>90){ 173 cout << "load file <" << *iFile << ">" << endl; 174 } 164 175 PInPersist fin(*iFile); 165 176 vector<string> vec = fin.GetNameTags(); 166 177 list<string> listOfSpectra; 178 //Keep only required PPF objects 167 179 std::remove_copy_if( 168 180 vec.begin(), vec.end(), back_inserter(listOfSpectra), … … 172 184 iSpecEnd = listOfSpectra.end(); 173 185 listOfSpectra.sort(stringCompare); 174 186 //Loop of spectra matrix 175 187 for (iSpec = listOfSpectra.begin(); iSpec !=iSpecEnd; ++iSpec){ 176 cout << " spactra <" << *iSpec << ">" << endl; 177 } 178 179 } 180 188 if (para.debuglev_>90){ 189 cout << " spactra <" << *iSpec << ">" << endl; 190 } 191 TMatrix<r_4> aSpec(NUMBER_OF_CHANNELS,NUMBER_OF_FREQ); 192 fin.GetObject(aSpec,*iSpec); 193 //How to see if the GetObject is ok?? Ask Reza 194 nSpectra++; 195 sumOfSpectra+=aSpec; 196 }//eo loop on spectra in a file 197 }//eo loop on files 198 199 //Normalisation 200 if(nSpectra>0)sumOfSpectra/=(r_4)(nSpectra); 201 202 {//Save the result 203 stringstream tmp; 204 tmp << nSpectra; 205 string fileName = para.outPath_+"/meanDiffOnOffRaw_"+StringToLower(para.sourceName_)+"-"+tmp.str()+"Cycles.ppf"; 206 cout << "Save mean based on " << nSpectra << " cycles " << endl; 207 string tag = "mean"; 208 POutPersist fos(fileName); 209 fos << PPFNameTag(tag) << sumOfSpectra; 210 } 181 211 } 182 212 //------------------------------------------------------- … … 226 256 }//eo while 227 257 228 para.debuglev_ = debuglev;258 para.debuglev_ = atoi(debuglev.c_str()); 229 259 para.inPath_ = inputPath; 230 260 para.outPath_ = outputPath; … … 250 280 try { 251 281 252 int b,e;253 char *match=regexp("truc0machin","[a-z]+[0-9]*",&b,&e);254 printf("->%s<-\n(b=%d e=%d)\n",match,b,e);282 // int b,e; 283 // char *match=regexp("truc0machin","[a-z]+[0-9]*",&b,&e); 284 // printf("->%s<-\n(b=%d e=%d)\n",match,b,e); 255 285 256 286 if ( action == "default" ) { -
BAORadio/AmasNancay/onoffmaker.sh
r540 r542 84 84 iojobpath="/sps/baoradio/AmasNancay/JEC" 85 85 $MKDIR -p $iojobpath 86 $ECHO "Usage in INTERACTIVE may be destructive... To be used with great care !!!!" 87 exit 0; 86 88 elif [ ${ENVIRONMENT} = "BATCH" ] ; then 87 89 iojobpath=${TMPBATCH} -
BAORadio/AmasNancay/rawonoffmaker.sh
r540 r542 82 82 iojobpath="/sps/baoradio/AmasNancay/JEC" 83 83 $MKDIR -p $iojobpath 84 $ECHO "Usage in INTERACTIVE may be destructive... To be used with great care !!!!" 85 exit 0; 84 86 elif [ ${ENVIRONMENT} = "BATCH" ] ; then 85 87 iojobpath=${TMPBATCH} -
BAORadio/AmasNancay/submit2bqs-anarawonoffmaker.sh
r540 r542 34 34 35 35 36 jobBatchName=" rawonoff-${sourceRadio}${dateJob}"36 jobBatchName="anarawonoff-${sourceRadio}${dateJob}" 37 37 38 38 jobLogName="${jobBatchName}.log.$$"
Note: See TracChangeset
for help on using the changeset viewer.