IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42086


Ignore:
Timestamp:
Feb 28, 2022, 2:33:50 PM (4 years ago)
Author:
eugene
Message:

injected sources used for detection efficiency are rejected if the minimum radius is too small : ensure the source radius is never < 5 x smoothSigma * smoothNsigma

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/psphotEfficiency.c

    r37590 r42086  
    33#define MODEL_MASK (PM_MODEL_STATUS_NONCONVERGE | PM_MODEL_STATUS_OFFIMAGE | \
    44                    PM_MODEL_STATUS_BADARGS | PM_MODEL_STATUS_LIMITS) // Mask to apply to models
    5 
    6 # define TESTING 0
    75
    86// Calculate the limiting magnitude for an image
     
    122120             meanVar, *covarFactor, thresh, *norm, *magLim);
    123121
    124     *radius = smoothSigma * smoothNsigma;
     122    *radius = 5 * smoothSigma * smoothNsigma;
    125123
    126124    *minFlux = 0.1 * sqrtf(meanVar);
     125
     126    psLogMsg ("psphot", PS_LOG_INFO, "Detection efficiency PSF radius: %d, minFlux: %f\n", *radius, *minFlux);
    127127
    128128    return true;
     
    291291    psphotRemoveAllSourcesByArray(realSources, recipe);
    292292
     293# define TESTING 0
    293294#if TESTING
    294295    {
     
    340341    psphotSaveImage(NULL, readout->mask, "fake_mask.fits");
    341342#endif
     343#undef TESTING
    342344
    343345    // XXX Could speed this up significantly by only convolving the central pixels of each fake source
     
    424426                    continue;
    425427                }
     428
     429                // XXX this radius is too small : for faint sources the modelSum < 0.8*modelNorm and the
     430                // source is rejected.  Add a factor of 2.0 to be sure we get value fluxes
    426431                float sourceRadius = PS_MAX(radius, model->class->modelRadius(model->params, minFlux)); // Radius for source
    427432                psFree(model);
     
    536541        psVectorInit(magMask, 0);
    537542
     543# define TESTING 0
    538544#if TESTING
    539545        psString name = NULL;
Note: See TracChangeset for help on using the changeset viewer.