Changeset 2028 in Sophya for trunk/ArchTOIPipe/TestPipes


Ignore:
Timestamp:
May 30, 2002, 2:32:24 PM (23 years ago)
Author:
ansari
Message:

Correction de pb divers (5) - Reza 30/5/2002

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ArchTOIPipe/TestPipes/aksj02.cc

    r2027 r2028  
    4242         << "         [-dbg] [-wtoi sz] [-wclean wsz,nbw] [-range min,max] \n"
    4343         << "         [-soff wsz,nptfit,degpol] [-soffnt PPFName] \n"
    44          << "         [-soff2 wsz,nptfit,degpol] [-soffnt2 PPFName] \n"
    45          << "         [-gfilt wsz,sigma] \n"
    4644         << "         [-bgalcut bmin,bmax] [-bgal toiname] [-bgalfile pointFitsName] \n"
     45         << "         [-soff2 wsz,nptfit,degpol] [-soff2nt PPFName] \n"
     46         << "         [-bgal2cut bmin,bmax] \n"
     47         << "         [-gfilt wsz,sigma] \n"
    4748         << "         [-nooutflg] [-wrtms] [-wrtifo] [-prstat] [-useseqbuff] \n"
    4849         << "         inFitsName outFitsName \n"
     
    5758         << "   -soff wsz,nptfit,degpol : set SimpleOffsetEstimator parameters\n"
    5859         << "   -soffnt PPFName : Writes out SimpleOffsetEstimator NTuple \n"
     60         << "   -bgalcut bmin,bmax: Galactic latitude cut (in degree) for SimpleOffsetEstimator\n"
     61         << "   -bgal toiname: Galactic latitude toiname \n"
     62         << "   -bgalfile pointFitsName: Pointing FITS file name (for gal. latitude) \n"
     63         << "   -soff2 wsz,nptfit,degpol : set SimpleOffsetEstimator_2 parameters\n"
     64         << "   -soff2nt PPFName : Writes out SimpleOffsetEstimator_2 NTuple \n"
     65         << "   -bgal2cut bmin,bmax: Galactic latitude cut (in degree) for SimpleOffsetEstimator_2\n"
    5966         << "   -gfilt wsz,sigma : Activate gaussian filter (par= window size, sigma) \n"
    6067      //         << "   -wfft sz : Activate Fourier filter and sets its width \n"
     
    124131  // Coordinate file for galactic cut
    125132  string pointfile = "pointgal.fits";
    126   double bmin = -20;
    127   double bmax = 20.;
     133  double bmin = -10;
     134  double bmax = 10.;
     135  bool bgalcut = false;
    128136  string bgaltoi = "bgal";
    129   bool bgalcut = false;
     137  bool bgalfile = false;
     138  double bmin2 = -10;
     139  double bmax2 = 10.;
     140  bool bgal2cut = false;
    130141
    131142  // File names
     
    183194      ia++;
    184195    }
    185     else if (strcmp(arg[ia],"-soffnt2") == 0) {
     196    else if (strcmp(arg[ia],"-soff2nt") == 0) {
    186197      soff2_nt = true;
    187198      soff2_nt_ppfname = arg[ia+1];  ia++;
     
    199210      ia++;
    200211    }
     212    else if (strcmp(arg[ia],"-bgal2cut") == 0) {
     213      if (ia == narg-1) Usage(true);
     214      sscanf(arg[ia+1],"%lf,%lf", &bmin2, &bmax2);
     215      bgal2cut = true;
     216      ia++;
     217    }
    201218    else if (strcmp(arg[ia],"-bgalfile") == 0) {
    202219      if (ia == narg-1) Usage(true);
    203220      pointfile = arg[ia+1];
     221      bgalfile = true;
    204222      ia++;
    205223    }
     
    241259  InitTim();
    242260  if ((soff2_dofg == true) && (wtoi < 32768))      wtoi = 32768;
     261  if (!bgalfile)  bgalcut = bgal2cut = false;
     262
    243263  cout << ">>>> aksj02: Infile= " << infile << " outFile="
    244264       << outfile << endl;
     
    285305         
    286306    FITSTOIReader* rbgal = NULL;
    287     if (bgalcut) {  // if Galactic cut
     307    if (bgalfile) {  // if Galactic cut
    288308      cout << "> Creating bgal FITSTOIReader object - InFile=" << pointfile
    289309           << " bgaltoiname= " << bgaltoi << endl;
     310      rbgal = new FITSTOIReader(pointfile);
     311    }
     312   
     313    if (bgalfile && bgalcut) {
    290314      cout << "  offes.SetBGalCut( " << bmin << "," << bmax << ")" << endl;
    291       rbgal = new FITSTOIReader(pointfile);
    292315      offes.SetBGalCut(bmin, bmax);     
     316    }
     317    if (soff2_dofg && bgalfile && bgal2cut) {
     318      cout << "  offes2.SetBGalCut( " << bmin2 << "," << bmax2 << ")" << endl;
     319      offes2.SetBGalCut(bmin, bmax);     
    293320    }
    294321
     
    304331    plombier.Connect(r, intoi, cleaner, inname);
    305332    plombier.Connect(cleaner, "out", offes, "in");
    306      
    307     if (bgalcut) {
     333
     334    if (soff2_dofg && bgalcut && bgal2cut ) {
     335      inname = "bgal";
     336      outname = "bgalcopie";
     337      plombier.Connect(*rbgal, bgaltoi, offes, inname);     
     338      plombier.Connect(offes, outname, offes2, inname);     
     339    }
     340    else if (soff2_dofg && bgal2cut) {
     341      inname = "bgal";
     342      plombier.Connect(*rbgal, bgaltoi, offes2, inname);     
     343    }
     344    else if (bgalcut) {
    308345      inname = "bgal";
    309346      plombier.Connect(*rbgal, bgaltoi, offes, inname);     
Note: See TracChangeset for help on using the changeset viewer.