IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 36293


Ignore:
Timestamp:
Nov 21, 2013, 9:38:49 AM (13 years ago)
Author:
eugene
Message:

allow smooth with PS1_V1

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130904/ppSim/src/ppSimSmoothReadout.c

    r29002 r36293  
    44{
    55    bool status;
     6    psTimerStart ("ppSmooth");
    67
    78    // XXX use these defaults?
     
    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.