Changeset 3956 in Sophya for trunk/AddOn/TAcq/branap.cc


Ignore:
Timestamp:
Mar 2, 2011, 3:31:39 PM (15 years ago)
Author:
ansari
Message:

Amelioration du processeur de calcul de visibilite (BRVisibilityCalculator) et du programme vismfib.cc pour permettre la prise en charge des donnees raw-2c pour le calcul des visibilites et ajout de la possibilite d ecrire les fichiers de sortie (matrices de visibilites) au format FITS, Reza 02/03/2011

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/AddOn/TAcq/branap.cc

    r3946 r3956  
    1616{
    1717  outpath_="./";
     18  fgfitsout_=false;
    1819  nmean_=nmean;
    1920  nbloc_=1;
     
    2627  nzones_=nzon;
    2728  npaqinzone_=npaqz;
    28   fgdatafft_=false;  fgsinglechannel_=false; fgforcesinglechan_=false;
     29  fgdatafft_=false;   fgforceraworfft_=false;
     30  fgsinglechannel_=false; fgforcesinglechan_=false;
    2931  prtlevel_=0;
    3032  prtmodulo_=50000;
     
    6466      ka+=2;
    6567    }
     68    else if (strcmp(arg[ka],"-fitsout")==0) {
     69      fgfitsout_=true;
     70      ka++;
     71    }
    6672    else if (strcmp(arg[ka],"-nmean")==0) {
    6773      nmean_=atoi(arg[ka+1]);
     
    101107    else if (strcmp(arg[ka],"-singlechan")==0) {
    102108      fgsinglechannel_=true; fgforcesinglechan_ = true;
     109      ka++;
     110    }
     111    else if (strcmp(arg[ka],"-rawdata")==0) {
     112      fgforceraworfft_=true; fgdatafft_ = false;
     113      ka++;
     114    }
     115    else if (strcmp(arg[ka],"-fftdata")==0) {
     116      fgforceraworfft_=true; fgdatafft_ = true;
    103117      ka++;
    104118    }
     
    166180{
    167181  cout << " --- BRAnaParam : Reading/Processing BAORadio FITS files parameters " << endl;
    168   cout << " Usage:  prgname [-act ACT] [-out OutPath] [-nmean NMean] [-zones NZones,nPaqinZone] \n"
     182  cout << " Usage:  prgname [-act ACT] [-out OutPath] [-fitsout] \n"
     183       << "                 [-nmean NMean] [-zones NZones,nPaqinZone] \n"
    169184       << "                 [-nbloc NBloc] [-freq NumFreqMin,NumFreqMax,NBinFreq] \n"
    170        << "                 [-prt lev,modulo] [-nvcal n] [-nthr n] [-nosfc] [-singlechan]\n"
    171        << "                 [-freqfilter]\n"
    172        << "                 [-gain filename] [-varcut min,max] [-nband nband,first,last] \n"
     185       << "                 [-prt lev,modulo] [-nvcal n] [-nthr n] [-nosfc]\n"
     186       << "                 [-singlechan] [-fftdata] [-rawdata] \n"
     187       << "                 [-freqfilter] [-gain filename] [-varcut min,max] [-nband nband,first,last] \n"
    173188       << "                 [-filldt] [-tspwin wsz,extsz,nfiles] \n"
    174189       << "         -in Imin,Imax,Istep InPath FiberList [InPath2 FiberList2 InPath3 FiberList3 ...] \n" << endl;
     
    178193  }
    179194  cout << " -act Action: cube3d or vis or viscktt or mspec \n"
    180        << "    cube3d: create 3D fits cubes, vis: compute visibilites,  \n"
    181        << "    viscktt: compute visibilities and check TimeTag/FrameCounter\n "
     195       << "    cube3d: create 3D fits cubes \n "
     196       << "    vis: compute visibilites (vismfib program) \n"
     197       << "    viscktt: compute visibilities and check TimeTag/FrameCounter (vismfib program)\n "
    182198       << "    mspec: compute and save mean spectra for each channel \n "
    183199       << "    bproc: run BRBaseProcessor for debug/printing (use -prt)  \n "
    184200       << " -out OutPath: Output directory name \n"
     201       << " -fitsout : Force FITS format for output files  \n"
    185202       << " -nmean NMean: Number of packet used for spectra/visibility computation \n"
    186203       << " -nbloc NBloc: Number of MemMgr blocs in output file\n"
    187        << " -zones NZones,NbPaqinZone : Number of Zones and number of paquets in one zone \n"
     204       << " -zones NZones,NbPaqinZone : Number of Zones and number of paquets in one zone (RAcqMemZoneMgr) \n"
    188205       << " -freq NumFreqMin,NumFreqMax,NBinFreq : Frequency zone and number of bins \n"
    189206       << " -prt lev,modulo : Print level (0,1,2...) and print counter modulo (10000, 50000 ...) \n"
     
    192209       << " -nosfc : Don't force reading with SAME FrameCounter \n"
    193210       << " -singlechan : Force one channel per fiber \n"
     211       << " -rawdata : Force raw data mode (firmware raw) \n"
     212       << " -fftdata : Force FFT data mode (firmware fft) \n"
    194213       << " -varcut min,max : min-max cut on variance \n"
    195214       << " -nband nband,first,last: numbers of freq. bands and first and last bands used for cuts \n"
     
    212231  char flnm[1024];
    213232  sprintf(flnm,"%s/signal%d.fits",dirlist_[0].c_str(),imin_);
    214   int rc = DecodeMiniFitsHeader(flnm,paqsize_, npaqinfile_,fgdatafft_, fgsinglechannel_);
     233  bool fgdatafft_in_fits=false;
     234  int rc = DecodeMiniFitsHeader(flnm,paqsize_, npaqinfile_,fgdatafft_in_fits, fgsinglechannel_);
    215235  if(fgforcesinglechan_) fgsinglechannel_= true;
     236  if (!fgforceraworfft_) fgdatafft_=fgdatafft_in_fits;
    216237  return rc;
    217238}
     
    225246  cout << " IMin= " << imin_ << " IMax= " << imax_ << " IStep= " << istep_
    226247       << ((rdsamefc_)?" SameFrameCounter read mode":" AllOKPaquets read mode ") << endl;
    227   cout << " OutPath= " << outpath_ << endl;
     248  cout << " OutPath= " << outpath_ << (fgfitsout_?" force FITS output":" PPF output") << endl;
    228249  cout << " Action=" << action_ << "  NMean=" << nmean_ << " NBloc=" << nbloc_ << endl;
    229250  cout << " FreqMin= " << freqmin_ << " FreqMax= " << freqmax_ << " NBinFreq= " << nbinfreq_ << endl;
     
    237258  cout << " PaqSize=" << paqsize_ << "  -  NZones=" << nzones_ << " NPaqZone=" << npaqinzone_
    238259       << " PrtLevel=" << prtlevel_ << " PrtCntModulo=" <<  prtmodulo_ << endl;
    239   cout << " AcqMode: " << ((fgdatafft_)?" Data_FFT " : " Data_Raw " )
     260  cout << " AcqDataMode: " << ((fgdatafft_)?" Data_FFT " : " Data_Raw " )
    240261       << ((fgsinglechannel_)?" SingleChannel " : " TwoChannels " ) << endl;
    241262  cout << " NbVisibCalculator in Group: " <<  nbcalgrp_ << " with N//threads: " << nthreads_ << endl;
Note: See TracChangeset for help on using the changeset viewer.