IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 17338


Ignore:
Timestamp:
Apr 6, 2008, 10:13:54 AM (18 years ago)
Author:
eugene
Message:

drop sentinal values of crNsigma (should be NAN if not measured); call ModelContour before CR

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branch_20080324/psphot/src/psphotSourceSize.c

    r17239 r17338  
    2929        if (isfinite(source->crNsigma)) continue;
    3030
    31         source->crNsigma  = -1.0;
    32         source->extNsigma = 0.0;
    33 
    3431        // source must have been subtracted
    35         source->crNsigma  = -3.0;
    3632        if (!(source->mode & PM_SOURCE_MODE_SUBTRACTED)) continue;
    3733
     
    4036        psU8 **mask    = source->maskObj->data.U8;
    4137
     38        // check for extendedness: measure the delta flux significance at the 1 sigma contour
     39        source->extNsigma = psphotModelContour (source->pixels, source->weight, source->maskObj, source->modelPSF, 1.0);
     40
     41        // XXX prevent a source from being both CR and EXT?
     42        if (source->extNsigma > EXT_NSIGMA_LIMIT) {
     43          source->mode |= PM_SOURCE_MODE_EXT_LIMIT;
     44        }
     45
    4246        int xPeak = source->peak->xf - source->pixels->col0 + 0.5;
    4347        int yPeak = source->peak->yf - source->pixels->row0 + 0.5;
    4448
    45         // skip sources which are too close to a boundary
    46         source->crNsigma  = -4.0;
     49        // XXX for now, skip sources which are too close to a boundary
     50        // XXX raise a flag?
    4751        if (xPeak < 1) continue;
    4852        if (xPeak > source->pixels->numCols - 2) continue;
     
    5155
    5256        // XXX for now, just skip any sources with masked pixels
    53         source->crNsigma  = -5.0;
     57        // XXX raise a flag?
    5458        bool keep = true;
    5559        for (int iy = -1; (iy <= +1) && keep; iy++) {
     
    5963        }
    6064        if (!keep) continue;
    61 
    62         // measure the flux at the 1 sigma contour
    63         // XXX prevent a source from being both CR and EXT?
    64         source->extNsigma = psphotModelContour (source->pixels, source->weight, source->maskObj, source->modelPSF, 1.0);
    65 
    66         if (source->extNsigma > EXT_NSIGMA_LIMIT) {
    67           source->mode |= PM_SOURCE_MODE_EXT_LIMIT;
    68         }
    6965
    7066        // XXX need to deal with edge peaks... and mask
Note: See TracChangeset for help on using the changeset viewer.