IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32242


Ignore:
Timestamp:
Aug 31, 2011, 12:45:46 PM (15 years ago)
Author:
eugene
Message:

for extended sources, use kron S/N not psf S/N

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20110710/psphot/src/psphotBlendFit.c

    r31452 r32242  
    186186    psFree (fitOptions);
    187187
    188     psLogMsg ("psphot.psphotBlendFit", PS_LOG_INFO, "fit models: %f sec for %d objects (%d psf, %d ext, %d failed, %ld skipped)\n", psTimerMark ("psphot.fit.nonlinear"), Nfit, Npsf, Next, Nfail, sources->n - Nfit);
     188    psLogMsg ("psphot.psphotBlendFit", PS_LOG_WARN, "fit models: %f sec for %d objects (%d psf, %d ext, %d failed, %ld skipped)\n", psTimerMark ("psphot.fit.nonlinear"), Nfit, Npsf, Next, Nfail, sources->n - Nfit);
    189189
    190190    psphotVisualShowResidualImage (readout, false);
     
    233233        pmSource *source = sources->data[i];
    234234
     235# define TEST_X -420.0
     236# define TEST_Y 300.0
     237   
     238        if ((fabs(source->peak->xf - TEST_X) < 5) && (fabs(source->peak->yf - TEST_Y) < 5)) {
     239            fprintf (stderr, "test galaxy\n");
     240        }
     241
     242# undef TEST_X
     243# undef TEST_Y
     244
    235245        // skip non-astronomical objects (very likely defects)
    236246        if (source->mode &  PM_SOURCE_MODE_BLEND) continue;
     
    246256
    247257        // limit selection to some SN limit
    248         if (sqrt(source->peak->detValue) < FIT_SN_LIM) continue;
    249 
     258        if (source->mode & PM_SOURCE_MODE_EXT_LIMIT) {
     259            if (source->moments->KronFlux < FIT_SN_LIM * source->moments->KronFluxErr) continue;
     260        } else {
     261            if (sqrt(source->peak->detValue) < FIT_SN_LIM) continue;
     262        }
    250263        // exclude sources outside optional analysis region
    251264        if (source->peak->xf < AnalysisRegion.x0) continue;
     
    267280        }
    268281
    269         // replace object in image
     282        // replace object in image & remove excess noise
    270283        if (source->tmpFlags & PM_SOURCE_TMPF_SUBTRACTED) {
    271284            pmSourceAdd (source, PM_MODEL_OP_FULL, maskVal);
     
    305318        Nfail ++;
    306319
    307         // re-subtract the object, leave local sky
     320        // re-subtract the object, leave local sky, re-bump noise
    308321        pmSourceCacheModel (source, maskVal);
    309322        pmSourceSub (source, PM_MODEL_OP_FULL, maskVal);
Note: See TracChangeset for help on using the changeset viewer.