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


Ignore:
Timestamp:
Nov 29, 2009, 12:13:54 AM (16 years ago)
Author:
ansari
Message:

Introduction de la classe FitsCubeWriter - Reza 28/11/2009

File:
1 edited

Legend:

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

    r3687 r3688  
    1414  outpath_="./";
    1515  nmean_=nmean;
     16  nbloc_=1;
    1617  imin_=imax_=0;
    1718  istep_=1;
     19  freqmin_=freqmax_=0;
     20  nbinfreq_=1; 
    1821  paqsize_=16424;
    1922  nzones_=nzon;
    2023  npaqinzone_=npaqz;
     24  prtlevel_=0;
    2125}
    2226
     
    3034  int ka=1;
    3135  while (ka<(narg-1)) {
     36    cout << " *DBG ka=" << ka << " narg=" << narg << " arg[ka]=" << arg[ka] << endl;
    3237    if (strcmp(arg[ka],"-act")==0) {
    3338      action_=arg[ka+1];
     
    3641    else if (strcmp(arg[ka],"-out")==0) {
    3742      outpath_=arg[ka+1];
     43      size_t lenp=outpath_.size();
     44      if ((lenp>0)&&(outpath_[lenp-1]!='/'))  outpath_+='/';
    3845      ka+=2;
    3946    }
    4047    else if (strcmp(arg[ka],"-nmean")==0) {
    4148      nmean_=atoi(arg[ka+1]);
     49      ka+=2;
     50    }
     51    else if (strcmp(arg[ka],"-nbloc")==0) {
     52      nbloc_=atoi(arg[ka+1]);
     53      ka+=2;
     54    }
     55    else if (strcmp(arg[ka],"-freq")==0) {
     56      sscanf(arg[ka+1],"%d,%d,%d",&freqmin_,&freqmax_,&nbinfreq_); 
    4257      ka+=2;
    4358    }
     
    4964      ka+=2;
    5065    }
     66    else if (strcmp(arg[ka],"-prtlev")==0) {
     67      prtlevel_=atoi(arg[ka+1]);
     68      ka+=2;
     69    }
    5170    else if (strcmp(arg[ka],"-in")==0) {
    5271      if ((narg-ka)<4)  {
     
    5574      }
    5675      sscanf(arg[ka+1],"%d,%d,%d",&imin_,&imax_,&istep_);  ka+=2;
    57       while(ka<(narg-3)) {
     76      while(ka<(narg-1)) {
    5877        string inpath = arg[ka];
    59         if (inpath.size()<1)  inpath="./";
    60         if (inpath[inpath.size()-1]!='/')  inpath[inpath.size()-1]='/';
     78        size_t lenp=inpath.size();
     79        if (lenp<1)  inpath="./";
     80        if ((lenp>0)&&(inpath[lenp-1]!='/'))  inpath+='/';
    6181        vector<string> fiblist;
    6282        string sa1 = arg[ka+1];
     
    7191      okarg=true;
    7292    }
     93    else ka++;
    7394  }
     95
    7496  if (!okarg) {
    7597    cout << " BRAnaParam::DecodeArgs() / Argument error " << endl;
     
    84106  cout << " --- BRAnaParam : Reading/Processing BAORadio FITS files parameters " << endl;
    85107  cout << " Usage:  prgname [-act ACT] [-out OutPath] [-nmean NMean] [-zones NZones,nPaqinZone] \n"
     108       << "                 [-nbloc NBloc] [-freq NumFreqMin,NumFreqMax,NBinFreq] \n"
    86109       << "         -in Imin,Imax,Istep InPath FiberList [InPath2 FiberList2 InPath3 FiberList3 ...] \n" << endl;
    87110  if (fgshort) {
     
    89112    return 5;
    90113  }
    91   cout << " -act Action: Not YET used  \n"
     114  cout << " -act Action: cube3d or vis   \n"
    92115       << " -out OutPath: Output directory name \n"
    93116       << " -nmean NMean: Number of packet used for spectra/visibility computation \n"
     117       << " -nbloc NBloc: Number of MemMgr blocs in output file\n"
    94118       << " -zones NZones,NbPaqinZone : Number of Zones and number of paquets in one zone \n"
     119       << " -freq NumFreqMin,NumFreqMax,NBinFreq : Frequency zone and number of bins \n"
    95120       << " -in : input files/directory definition : \n"
    96121       << "       Imin,Imax,Istep: fits files signalII.fits Imin<=II<=Imax Istep=increment \n"
     
    117142  cout << " IMin= " << imin_ << " IMax= " << imax_ << " IStep= " << istep_ << endl;
    118143  cout << " OutPath= " << outpath_ << endl;
    119   cout << "  NMean=" << nmean_ << " PaqSize=" << paqsize_ << "  -  NZones=" << nzones_
    120        << " NPaqZone=" << npaqinzone_ << endl;
     144  cout << " Action=" << action_ << "  NMean=" << nmean_ << " NBloc=" << nbloc_ << endl;
     145  cout << " FreqMin= " << freqmin_ << " FreqMax= " << freqmax_ << " NBinFreq= " << nbinfreq_ << endl;
     146  cout << " PaqSize=" << paqsize_ << "  -  NZones=" << nzones_ << " NPaqZone=" << npaqinzone_
     147       << " PrtLevel=" << prtlevel_ << endl;
    121148  return os;
    122149}
Note: See TracChangeset for help on using the changeset viewer.