Changeset 2031 in Sophya for trunk/ArchTOIPipe


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

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

File:
1 edited

Legend:

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

    r2028 r2031  
    289289    offes.SavePolyNTuple(soff_nt, soff_nt_ppfname);
    290290
    291     SimpleOffsetEstimator offes2;
     291    SimpleOffsetEstimator* offes2;
    292292    if (soff2_dofg) {
    293293      cout << "> Creating 2nd SimpleOffsetEstimator(" << soff2_mwsz << "," << soff2_nptfit
    294294           << "," << soff2_degpol << ")" << endl;
    295       offes2.SetParams(soff2_mwsz, soff2_nptfit, soff2_degpol);
    296       offes2.SavePolyNTuple(soff2_nt, soff2_nt_ppfname);
    297     }
    298 
    299     if (gfilt_fg)
     295      offes2 = new SimpleOffsetEstimator(soff2_mwsz, soff2_nptfit, soff2_degpol);
     296      offes2->SavePolyNTuple(soff2_nt, soff2_nt_ppfname);
     297    }
     298
     299    SimpleFilter *filt = NULL;
     300    if (gfilt_fg) {
    300301      cout << "> Creating a GaussianFilter SimpleFilter Object " << endl;
    301     double G_sigma = gfilt_sigma;
    302     double G_a = 1./(G_sigma*sqrt(M_PI*2.));
    303     SimpleFilter filt(gfilt_wsz, SimpleFilter::GaussFilter, G_a, G_sigma);
    304 
     302      double G_sigma = gfilt_sigma;
     303      double G_a = 1./(G_sigma*sqrt(M_PI*2.));
     304      filt = new SimpleFilter(gfilt_wsz, SimpleFilter::GaussFilter, G_a, G_sigma);
     305    }
    305306         
    306307    FITSTOIReader* rbgal = NULL;
     
    317318    if (soff2_dofg && bgalfile && bgal2cut) {
    318319      cout << "  offes2.SetBGalCut( " << bmin2 << "," << bmax2 << ")" << endl;
    319       offes2.SetBGalCut(bmin, bmax);     
     320      offes2->SetBGalCut(bmin, bmax);     
    320321    }
    321322
     
    336337      outname = "bgalcopie";
    337338      plombier.Connect(*rbgal, bgaltoi, offes, inname);     
    338       plombier.Connect(offes, outname, offes2, inname);     
     339      plombier.Connect(offes, outname, *offes2, inname);     
    339340    }
    340341    else if (soff2_dofg && bgal2cut) {
    341342      inname = "bgal";
    342       plombier.Connect(*rbgal, bgaltoi, offes2, inname);     
     343      plombier.Connect(*rbgal, bgaltoi, *offes2, inname);     
    343344    }
    344345    else if (bgalcut) {
     
    350351      inname = "in";
    351352      outname = "out";
    352       plombier.Connect(offes, outname, offes2, inname);     
     353      plombier.Connect(offes, outname, *offes2, inname);     
    353354      if (bgalcut) {
    354355        inname = "bgal";
    355356        outname = "bgalcopie";
    356         plombier.Connect(offes, outname, offes2, inname);           
     357        plombier.Connect(offes, outname, *offes2, inname);           
    357358      }
    358359    }
     
    360361    if (gfilt_fg) {
    361362      if (soff2_dofg)
    362         plombier.Connect(offes2, "out", filt, "in");
     363        plombier.Connect(*offes2, "out", *filt, "in");
    363364      else
    364         plombier.Connect(offes, "out", filt, "in");
    365       plombier.Connect(filt, "out", w, "outfcln", "", 0, fg_wrtflag);
     365        plombier.Connect(offes, "out", *filt, "in");
     366      plombier.Connect(*filt, "out", w, "outfcln", "", 0, fg_wrtflag);
    366367    }
    367368    else {
    368369      if (soff2_dofg)
    369         plombier.Connect(offes2, "out", w, "outcln", "", 0, fg_wrtflag);
     370        plombier.Connect(*offes2, "out", w, "outcln", "", 0, fg_wrtflag);
    370371      else
    371372        plombier.Connect(offes, "out", w, "outcln", "", 0, fg_wrtflag);
     
    376377      plombier.Connect(offes, "offset", w, "offset");
    377378      if (soff2_dofg)
    378         plombier.Connect(offes2, "offset", w, "offset2");
     379        plombier.Connect(*offes2, "offset", w, "offset2");
    379380    }
    380381    if (fg_wrtms) {
     
    388389    cout << cleaner;
    389390    cout << offes;
    390     if (soff2_dofg)  cout << offes2;
     391    if (soff2_dofg)  cout << *offes2;
    391392    cout << w;
    392393
     
    405406    cout << cleaner;
    406407    cout << offes;
    407     if (soff2_dofg)  cout << offes2;
    408     if (gfilt_fg)  cout << filt;
     408    if (soff2_dofg)  cout << *offes2;
     409    if (gfilt_fg)  cout << *filt;
    409410    cout << w;
    410411
     
    412413    PrtTim("End threads");
    413414    if (bgalcut)  delete rbgal;
    414 
     415    if (gfilt_fg)  delete filt;
     416    if (soff2_dofg)  delete offes2;
    415417  }
    416418  catch (PThrowable & exc) {
Note: See TracChangeset for help on using the changeset viewer.