Changeset 3979 in Sophya for trunk/AddOn/TAcq/branap.cc
- Timestamp:
- May 4, 2011, 9:18:09 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/branap.cc
r3967 r3979 45 45 46 46 gainfile_=""; 47 48 proctimeduration_=9.e9; 49 fgtimeselect_=false; 47 50 } 48 51 … … 137 140 ka++; 138 141 } 142 //-tmproc hh:mm:ss,nseconds 143 else if (strcmp(arg[ka],"-tmproc")==0) { 144 int ah=0,am=0; 145 double as=0, als=0; 146 sscanf(arg[ka+1],"%d:%d:%lg,%lg",&ah,&am,&as,&als); 147 fgtimeselect_=true; proctimeduration_=als; 148 proctimestart_.SetHour(ah,am,as); 149 ka+=2; 150 } 139 151 else if (strcmp(arg[ka],"-gain")==0) { 140 152 gainfile_=arg[ka+1]; … … 190 202 << " [-singlechan] [-twochan] [-fftdata] [-rawdata] \n" 191 203 << " [-freqfilter] [-gain filename] [-varcut min,max] [-nband nband,first,last] \n" 192 << " [- filldt] [-tspwin wsz,extsz,nfiles] \n"204 << " [-tmproc hh:mm:ss,nseconds] [-filldt] [-tspwin wsz,extsz,nfiles] \n" 193 205 << " -in Imin,Imax,Istep InPath FiberList [InPath2 FiberList2 InPath3 FiberList3 ...] \n" << endl; 194 206 if (fgshort) { … … 218 230 << " -varcut min,max : min-max cut on variance \n" 219 231 << " -nband nband,first,last: numbers of freq. bands and first and last bands used for cuts \n" 232 << " -tmproc hh:mm:ss,nseconds : processing time window definition \n" 220 233 << " -filldt : force data table filling \n" 221 234 << " -freqfilter : force median filtering on the frequencies \n" … … 238 251 bool fgdatafft_in_fits=false; 239 252 bool fgsinglechan_in_fits=false; 240 int rc = DecodeMiniFitsHeader(flnm,paqsize_, npaqinfile_,fgdatafft_in_fits, fgsinglechan_in_fits); 253 SOPHYA::TimeStamp tmstart; 254 int rc = DecodeMiniFitsHeader(flnm,paqsize_, npaqinfile_,fgdatafft_in_fits, fgsinglechan_in_fits,tmstart); 241 255 if (!fgforcesingleortwochan_) fgsinglechannel_=fgsinglechan_in_fits; 242 256 if (!fgforceraworfft_) fgdatafft_=fgdatafft_in_fits; 257 if (fgtimeselect_) { 258 int year,month,day; 259 tmstart.GetDate(year,month,day); 260 proctimestart_.SetDate(year,month,day); 261 proctimeend_.Set(proctimestart_.ToDays()+proctimeduration_/86400.); 262 } 243 263 return rc; 244 264 } … … 252 272 cout << " IMin= " << imin_ << " IMax= " << imax_ << " IStep= " << istep_ 253 273 << ((rdsamefc_)?" SameFrameCounter read mode":" AllOKPaquets read mode ") << endl; 274 if (fgtimeselect_) { 275 cout << " Processing time window, StartTime=" << proctimestart_ << " duration= " << proctimeduration_ 276 << " EndTime=" << proctimeend_ << endl; 277 } 254 278 cout << " OutPath= " << outpath_ << (fgfitsout_?" force FITS output":" PPF output") << endl; 255 279 cout << " Action=" << action_ << " NMean=" << nmean_ << " NBloc=" << nbloc_ << endl; … … 274 298 /* --Fonction-- */ 275 299 int BRAnaParam::DecodeMiniFitsHeader(const char* filename, uint_4& paqsz, uint_4& npaq, 276 bool& fgdatafft, bool& fgsinglechannel )300 bool& fgdatafft, bool& fgsinglechannel, SOPHYA::TimeStamp& tmstart) 277 301 { 278 302 cout << " DecodeMiniFitsHeader - Opening file: " << filename << endl; … … 285 309 if (acqmode.substr(0,3)=="fft") fgdatafft=true; 286 310 if (acqmode.find("1c") < acqmode.length()) fgsinglechannel=true; 311 string fkvs=mff.GetKeyValue("DATEOBS"); 312 if (fkvs.length()>0) tmstart.Set(fkvs); 313 fkvs=mff.GetKeyValue("TMSTART"); 314 if (fkvs.length()>0) tmstart.Set(fkvs); 287 315 return 0; 288 316 }
Note:
See TracChangeset
for help on using the changeset viewer.