IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 14, 2006, 6:33:17 AM (20 years ago)
Author:
eugene
Message:

mods to change from threshold above sky to S/N thresholds

File:
1 edited

Legend:

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

    r6379 r6427  
    22
    33// 2006.02.07 : no leaks
    4 bool psphotBasicDeblend (psArray *sources, psMetadata *config, psStats *sky) {
     4bool psphotBasicDeblend (psArray *sources, psMetadata *config) {
    55
    66    int N;
     
    1818    float NSIGMA   = psMetadataLookupF32 (&status, config, "DEBLEND_SKY_NSIGMA");
    1919    if (!status) NSIGMA = 5.0;
    20 
    21     float minThreshold = NSIGMA*sky->sampleStdev;
    2220
    2321    // we need sources spatially-sorted to find overlaps
     
    8381        // generate source contour (1/4 peak counts)
    8482        // set the threshold based on user inputs
    85         threshold = FRACTION * (source->peak->counts - source->moments->Sky) + source->moments->Sky;
    86         threshold = PS_MAX (threshold, minThreshold);
     83       
     84        // threshold is fraction of the source peak flux
     85        // image is background subtracted; source->moments->Sky should always be 0.0
     86        threshold = FRACTION * source->moments->Peak;
     87        // threshold is no less than NSIGMA above the local median sigma?
     88        threshold = PS_MAX (threshold, NSIGMA*source->moments->dSky);
    8789
    8890        // generate a basic contour (set of x,y coordinates at-or-below flux level)
Note: See TracChangeset for help on using the changeset viewer.