- Timestamp:
- Aug 8, 2011, 10:05:42 PM (14 years ago)
- Location:
- trunk/AddOn/TAcq
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/branap.cc
r4012 r4015 29 29 prtlevel_=0; 30 30 prtmodulo_=50000; 31 prtmodulo2_=10; 31 32 32 33 nmean_=nmean; … … 83 84 } 84 85 else if (strcmp(arg[ka],"-tmint")==0) { 85 timeinterval_=ato i(arg[ka+1]);86 timeinterval_=atof(arg[ka+1]); 86 87 fgtimeinterval_=true; ka+=2; 87 88 } … … 102 103 } 103 104 else if (strcmp(arg[ka],"-prt")==0) { 104 sscanf(arg[ka+1],"%d,%ld ",&prtlevel_,&prtmodulo_);105 sscanf(arg[ka+1],"%d,%ld,%ld",&prtlevel_,&prtmodulo_,&prtmodulo2_); 105 106 ka+=2; 106 107 } … … 211 212 cout << " --- BRAnaParam : Reading/Processing BAORadio FITS files parameters " << endl; 212 213 cout << " Usage: prgname [-act ACT] [-out OutPath] [-fitsout] \n" 213 << " [-nmean NMean] [- zones NZones,nPaqinZone] \n"214 << " [-nmean NMean] [-tmint dtime] [-zones NZones,nPaqinZone] \n" 214 215 << " [-nbloc NBloc] [-freq NumFreqMin,NumFreqMax,NBinFreq] \n" 215 << " [-prt lev,modulo ] [-nvcal n] [-nthr n] [-nosfc]\n"216 << " [-prt lev,modulo,mod2] [-nvcal n] [-nthr n] [-nosfc]\n" 216 217 << " [-singlechan] [-twochan] [-fftdata] [-rawdata] \n" 217 218 << " [-freqfilter medhw] [-gain filename] [-varcut min,max] [-nband nband,first,last] \n" … … 236 237 << " -zones NZones,NbPaqinZone : Number of Zones and number of paquets in one zone (RAcqMemZoneMgr) \n" 237 238 << " -freq NumFreqMin,NumFreqMax,NBinFreq : Frequency zone and number of bins \n" 238 << " -prt lev,modulo : Print level (0,1,2...) and print counter modulo (10000, 50000 ...)\n"239 << " -prt lev,modulo,mod2 : Print level (0,1,2...), counter modulo (10000,50000...), mod2 (10,50...) for filenums \n" 239 240 << " -nvcal n : number of BRVisibilityCalculator objects running in parallel in BRVisCalcGroup (default=1) \n" 240 241 << " -nthr n : number of threads for parallel execution in BRVisibilityCalculator (default=1) \n" … … 315 316 << " MaxNbFile=" << nbmax_specwfiles_ << endl; 316 317 cout << " PaqSize=" << paqsize_ << " - NZones=" << nzones_ << " NPaqZone=" << npaqinzone_ 317 << " PrtLevel=" << prtlevel_ << " PrtCntModulo=" << prtmodulo_ << endl;318 << " PrtLevel=" << prtlevel_ << " PrtCntModulo=" << prtmodulo_ << "," << prtmodulo2_ << endl; 318 319 cout << " AcqDataMode: " << ((fgdatafft_)?" Data_FFT " : " Data_Raw " ) 319 320 << ((fgsinglechannel_)?" SingleChannel " : " TwoChannels " ) << endl; -
trunk/AddOn/TAcq/branap.h
r4012 r4015 45 45 bool fgforcesingleortwochan_; // true force par la ligne de commande 46 46 int prtlevel_; 47 long int prtmodulo_ ;47 long int prtmodulo_, prtmodulo2_; 48 48 49 49 uint_4 nmean_; -
trunk/AddOn/TAcq/brviscalc.cc
r4012 r4015 38 38 39 39 npaqcumul_=0; 40 threshold_tt_=0; 40 41 moyfc_=moytt_=0.; 41 42 first_fc_=first_tt_=0; … … 333 334 if ( CheckInterval4VisMtxSave() ) { 334 335 if ((prtlev_>0)&&(numfile_%prtmodulo_==0)) { 335 cout << numfile_ << "-BRVisCalc[" << calcid_ << "/" << nbcalc_ << "]::run() NPaqProc=" 336 << totnbpaq_ << " TotMegaFLOP=" << (uint_8)TotNbMegaFLOP() << " -> VisibMtx FileNum=" << numfile_ << endl; 336 cout << numfile_ << "-BRVisCalc[" << calcid_ << "/" << nbcalc_ << "]::run() NPaqProc=" << totnbpaq_ 337 << " TTSec=" << getCurTimeTagSeconds() << " TotMegaFLOP=" << (uint_8)TotNbMegaFLOP() 338 << " VisibMtx_FileNum=" << numfile_ << endl; 337 339 } 338 340 SaveVisibilityMatrix(); … … 353 355 ttfirst_[fib]=vpaq_[fib].TimeTag(); 354 356 } 357 threshold_tt_=vpaq_[0].TimeTag(); 358 first_fc_=curfc_[0]; 359 first_tt_=vpaq_[0].TimeTag(); 355 360 } 356 361 totprocnpaq_++; … … 398 403 int BRVisibilityCalculator::Process() 399 404 { 400 if (totnbpaq_==0) UpdateChanIds(); // Appele ici pour etre sur que le thread de remplissage a mis l'info a jour. 405 if (totnbpaq_==0) { // qques initialisations a partir du premier paquet 406 UpdateChanIds(); // Appele ici pour etre sur que le thread de remplissage a mis l'info a jour. 407 threshold_tt_=vpaq_[0].TimeTag(); 408 first_fc_=curfc_[0]; 409 first_tt_= vpaq_[0].TimeTag(); 410 } 401 411 if (fgdataraw_) { // Donnees firmware RAW apres TF soft 402 412 for(size_t fib=0; fib<(size_t)memgr_.NbFibres(); fib++) { … … 414 424 if ( CheckInterval4VisMtxSave() ) { 415 425 if ((prtlev_>0)&&(numfile_%prtmodulo_==0)) { 416 cout << numfile_ << "-BRVisCalc[" << calcid_ << "/" << nbcalc_ << "]::Process() NPaqProc=" 417 << totnbpaq_ << " TotMegaFLOP=" << (uint_8)TotNbMegaFLOP() << " -> VisibMtx FileNum= " << numfile_ << endl; 426 cout << numfile_ << "-BRVisCalc[" << calcid_ << "/" << nbcalc_ << "]::Process() NPaqProc="<< totnbpaq_ 427 << " TTSec=" << getCurTimeTagSeconds() << " TotMegaFLOP=" << (uint_8)TotNbMegaFLOP() 428 << " VisibMtx_FileNum=" << numfile_ << endl; 418 429 } 419 430 SaveVisibilityMatrix(); … … 482 493 vismtx_ = complex<r_4>((r_4)0.,(r_4)0.); 483 494 npaqcumul_=0; 495 threshold_tt_=vpaq_[0].TimeTag(); 484 496 moyfc_=moytt_=0.; 485 497 first_fc_=curfc_[0]; … … 495 507 { 496 508 string ikey,ikdesc; 497 ikey="DATEOBS"; ikdesc=" Date /Time corresponding to TimeTagFirst";509 ikey="DATEOBS"; ikdesc=" Date,Time corresponding to TimeTagFirst"; 498 510 vismtx_.Info().SetS(ikey,first_tmstamp_.ToString()); 499 511 vismtx_.Info().SetComment(ikey,ikdesc); … … 518 530 ikey="NPAQSUM"; ikdesc="Number of paquets summed"; 519 531 vismtx_.Info().SetI(ikey,npaqcumul_); 532 vismtx_.Info().SetComment(ikey,ikdesc); 533 ikey="DELTIME"; ikdesc="visib cumul time (seconds)"; 534 vismtx_.Info().SetD(ikey,(vpaq_[0].TimeTag()-first_tt_)/1.25e8); 535 vismtx_.Info().SetComment(ikey,ikdesc); 520 536 } 521 537 -
trunk/AddOn/TAcq/brviscalc.h
r4012 r4015 72 72 // Pour passer en mode intervalle en temps pour sauvegarde matrices visibilites - intervalle de temps en secondes 73 73 inline void SetTimeIntervalMode(double dtime=1.) 74 { fgnpaq_time=false; dtimemean_=(dtime>1e-6)?dtime:1.; }74 { fgnpaq_time=false; dtimemean_=(dtime>1e-6)?dtime:1.; dtimem_ttops_=(uint_8)(dtimemean_*1.25e8); } 75 75 76 76 // Methode d'execution standard du thread (on redefinit la methode de BRBaseProcessor) … … 103 103 return ((npaqcumul_>=nmean_)?true:false); 104 104 else { 105 return (((vpaq_[0].TimeTag()- first_tt_)/1.25e8>=dtimemean_)?true:false);105 return (((vpaq_[0].TimeTag()-threshold_tt_)>=dtimem_ttops_)?true:false); 106 106 } 107 107 } … … 117 117 uint_4 nmean_; // Nombre de spectres pour le calcul des moyennes 118 118 double dtimemean_; // Intervalle en temps pour le calcul des moyennes - exprimes en secondes 119 uint_8 dtimem_ttops_; // Intervalle en temps pour le calcul des moyennes - en impulsions TimeTag (125 MHz) 120 uint_8 threshold_tt_; // Valeurs seuil TimeTag pour chaque matrice de visibilite - muliple de dtimem_ttops_ 119 121 bool fgnpaq_time; // true -> utilisation nmean_ comme nb de paquet/spectre, false -> dtimemean_ 120 122 -
trunk/AddOn/TAcq/vismfib.cc
r4012 r4015 77 77 if (par.fgfitsout_) procg.SetFitsOutput(); 78 78 if (par.fgtimeinterval_) procg.SetTimeIntervalMode(par.timeinterval_); 79 procg.SetPrintLevel(par.prtlevel_,par.prtmodulo2_); 79 80 BRFFTCalculator procfft(mmgr, par.fgsinglechannel_); 80 81
Note:
See TracChangeset
for help on using the changeset viewer.