IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42022


Ignore:
Timestamp:
Feb 7, 2022, 11:36:08 AM (4 years ago)
Author:
eugene
Message:

add count of where linear-fit sources are skipped; in deteff code, model radius is too small: many faint sources are rejected because the model does not include enough of the profile: increase by a factor of 5

Location:
branches/eam_branches/ipp-20211108/psphot/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20211108/psphot/src/psphotEfficiency.c

    r37590 r42022  
    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 1
    538544#if TESTING
    539545        psString name = NULL;
  • branches/eam_branches/ipp-20211108/psphot/src/psphotFitSourcesLinear.c

    r41444 r42022  
    217217    int Nsat = 0;
    218218
     219    // track number kept at several stages of the analysis
     220    int Nstep_0 = 0;
     221    int Nstep_1 = 0;
     222    int Nstep_2 = 0;
     223    int Nstep_3 = 0;
     224    int Nstep_4 = 0;
     225    int Nstep_5 = 0;
     226
    219227    // select the sources which will be used for the fitting analysis
    220228    for (int i = 0; i < sources->n; i++) {
     
    246254        if (source->mode & PM_SOURCE_MODE_MOMENTS_FAILURE) continue;
    247255
     256        Nstep_0++;
     257
    248258        // XXX count saturated stars
    249259        if (source->mode & PM_SOURCE_MODE_SATSTAR) {
     
    255265            if (!pmSourceCacheModel (source, maskVal)) continue;
    256266        }
     267        Nstep_1++;
    257268
    258269        // save the original coords
     
    265276        if (x > AnalysisRegion.x1) continue;
    266277        if (y > AnalysisRegion.y1) continue;
     278        Nstep_2++;
    267279
    268280        // check the integral of the model : is it large enough?
     
    283295            continue;
    284296        }
     297        Nstep_3++;
     298
    285299        bool isPSF = false;
    286300        pmModel *model = pmSourceGetModel (&isPSF, source);
     
    306320        }
    307321        if (modelSum  < cutModelSum * normFlux) continue;
     322        Nstep_4++;
     323
    308324        if (maskedSum < cutMaskedSum * normFlux) continue;
     325        Nstep_5++;
    309326
    310327        // clear the 'mark' pixels and remask on the fit aperture
     
    322339    }
    323340    psLogMsg ("psphot.ensemble", PS_LOG_MINUTIA, "built fitSources: %f sec (%ld objects)\n", psTimerMark ("psphot.linear"), sources->n);
     341    psLogMsg ("psphot.ensemble", PS_LOG_INFO, "Number of sources kept at each stage: %d %d %d %d %d %d\n", Nstep_0, Nstep_1, Nstep_2, Nstep_3, Nstep_4, Nstep_5);
    324342
    325343    if (fitSources->n == 0) {
Note: See TracChangeset for help on using the changeset viewer.