IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 16, 2009, 12:34:24 PM (17 years ago)
Author:
eugene
Message:

added additional flag values, threaded functions always use the threaded version

File:
1 edited

Legend:

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

    r21366 r21519  
    5656
    5757        // source must have been subtracted
    58         if (!(source->mode & PM_SOURCE_MODE_SUBTRACTED)) {
     58        if (!(source->tmpFlags & PM_SOURCE_TMPF_SUBTRACTED)) {
     59            source->mode |= PM_SOURCE_MODE_SIZE_SKIPPED;
    5960            psTrace("psphot", 7, "Not calculating extNsigma,crNsigma since source is not subtracted\n");
    6061            continue;
     
    6364        psF32 **resid  = source->pixels->data.F32;
    6465        psF32 **variance = source->variance->data.F32;
    65         psImageMaskType **mask    = source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA;
     66        psImageMaskType **mask = source->maskObj->data.PS_TYPE_IMAGE_MASK_DATA;
    6667
    6768        // check for extendedness: measure the delta flux significance at the 1 sigma contour
     
    8283        if (xPeak < 1 || xPeak > source->pixels->numCols - 2 ||
    8384            yPeak < 1 || yPeak > source->pixels->numRows - 2) {
     85            source->mode |= PM_SOURCE_MODE_SIZE_SKIPPED;
    8486            psTrace("psphot", 7, "Not calculating crNsigma due to edge\n");
    8587            continue;
     
    98100        if (!keep) {
    99101            psTrace("psphot", 7, "Not calculating crNsigma due to masked pixels\n");
     102            source->mode |= PM_SOURCE_MODE_SIZE_SKIPPED;
    100103            continue;
    101104        }
     
    156159        }
    157160        source->crNsigma  = (nCR > 0)  ? fCR / nCR : 0.0;
    158         if (!isfinite(source->crNsigma)) continue;
     161        if (!isfinite(source->crNsigma)) {
     162            continue;
     163        }
    159164
    160165        // this source is thought to be a cosmic ray.  flag the detection and mask the pixels
     
    264269    // replace the source flux
    265270    pmSourceAdd (source, PM_MODEL_OP_FULL, maskVal);
    266     source->mode &= ~PM_SOURCE_MODE_SUBTRACTED;
     271    source->tmpFlags &= ~PM_SOURCE_TMPF_SUBTRACTED;
    267272
    268273    // flag this as a CR
Note: See TracChangeset for help on using the changeset viewer.