IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Sep 5, 2011, 8:45:16 AM (15 years ago)
Author:
eugene
Message:

check for sources selected or rejected for analysis by object (psphotStack only); use kron flux significance for extended sources

File:
1 edited

Legend:

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

    r32238 r32310  
    77{
    88    bool status = true;
     9
     10    fprintf (stdout, "\n");
     11    psLogMsg ("psphot", PS_LOG_INFO, "--- psphot Extended Source Analysis (Petrosians) ---");
    912
    1013    // select the appropriate recipe information
     
    204207        pmSource *source = sources->data[i];
    205208
     209        // if we have checked the source validity on the basis of the object set, then
     210        // we either skip these tests below or we skip the source completely
     211        if (source->tmpFlags & PM_SOURCE_TMPF_STACK_SKIP) continue;
     212        if (source->tmpFlags & PM_SOURCE_TMPF_STACK_KEEP) goto keepSource;
     213
    206214        // skip PSF-like and non-astronomical objects
    207215        if (source->type == PM_SOURCE_TYPE_DEFECT) continue;
     
    217225
    218226        // limit selection to some SN limit
    219         assert (source->peak); // how can a source not have a peak?
    220         if (sqrt(source->peak->detValue) < SN_LIM) continue;
    221 
    222         // limit selection by analysis region
     227        // assert (source->peak); // how can a source not have a peak?
     228        // limit selection to some SN limit
     229        bool skipSource = false;
     230        if (source->mode & PM_SOURCE_MODE_EXT_LIMIT) {
     231            skipSource = (source->moments->KronFlux < SN_LIM * source->moments->KronFluxErr);
     232        } else {
     233            skipSource = (sqrt(source->peak->detValue) < SN_LIM);
     234        }
     235        if (skipSource) continue;
     236
     237        // limit selection by analysis region (this automatically apply
    223238        if (source->peak->x < region->x0) continue;
    224239        if (source->peak->y < region->y0) continue;
    225240        if (source->peak->x > region->x1) continue;
    226241        if (source->peak->y > region->y1) continue;
     242
     243    keepSource:
    227244
    228245        // replace object in image
Note: See TracChangeset for help on using the changeset viewer.