IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Dec 10, 2013, 2:55:11 PM (12 years ago)
Author:
eugene
Message:

merge changes from eam_branches/ipp-20130904

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/ppSim/src/ppSimSmoothReadout.c

    r29002 r36375  
    44{
    55    bool status;
     6    psTimerStart ("ppSmooth");
    67
    7     // XXX use these defaults?
    8     // float minGauss = 0.1;
    9     float nSigma = 4.0;
     8    float nSigma = psMetadataLookupF32(&status, recipe, "CONVOLVE.NSIGMA"); // SIGMA convolutions (pixels)
     9    if (!status) nSigma = 5.0;
     10
    1011    float sigma = psMetadataLookupF32(&status, recipe, "SEEING"); // Seeing SIGMA (pixels)
    1112
    12     // bool oldThreads = psImageConvolveSetThreads(true); // Old value of threading in psImageConvolve
     13    char *modelName = psMetadataLookupStr(&status, recipe, "PSF.MODEL"); // Seeing SIGMA (pixels)
     14    if (!strcmp (modelName, "PS_MODEL_GAUSS")) {
     15      // bool oldThreads = psImageConvolveSetThreads(true); // Old value of threading in psImageConvolve
     16      // smooth the image in place, applying the mask as we go
     17      psImageSmooth(input->image, sigma, nSigma);
     18      psLogMsg("ppSmooth", PS_LOG_MINUTIA, "smooth image: %f sec\n", psTimerMark("ppSmooth"));
     19      return true;
     20    }
    1321
    14     psTimerStart ("ppSmooth");
     22    if (!strcmp (modelName, "PS_MODEL_PS1_V1")) {
     23      // bool oldThreads = psImageConvolveSetThreads(true); // Old value of threading in psImageConvolve
     24      // smooth the image in place, applying the mask as we go
     25      psImageSmooth2dCacheData *smdata = psImageSmooth2dCacheAlloc(nSigma);
     26      psImageSmooth2dCacheKernel_PS1_V1 (smdata, sigma, 1.0);
    1527
    16     // smooth the image in place, applying the mask as we go
    17     psImageSmooth(input->image, sigma, nSigma);
    18     psLogMsg("ppSmooth", PS_LOG_MINUTIA, "smooth image: %f sec\n", psTimerMark("ppSmooth"));
     28      psImageSmooth2dCache_F32 (input->image, smdata);
     29
     30      psFree (smdata);
     31      psLogMsg("ppSmooth", PS_LOG_MINUTIA, "smooth image: %f sec\n", psTimerMark("ppSmooth"));
     32      return true;
     33    }
    1934
    2035    // psImageConvolveSetThreads(oldThreads);
    21     return true;
     36    psLogMsg("ppSmooth", PS_LOG_MINUTIA, "failed to smooth image: %f sec\n", psTimerMark("ppSmooth"));
     37    return false;
    2238}
    2339
Note: See TracChangeset for help on using the changeset viewer.