IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 11164


Ignore:
Timestamp:
Jan 18, 2007, 6:46:33 PM (19 years ago)
Author:
eugene
Message:

using peak SN not moments->Peak to set blend threshold; only allow one primary source per blend

File:
1 edited

Legend:

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

    r10803 r11164  
    2727    for (int i = 0; i < SN->n; i++) {
    2828        source = sources->data[i];
    29         SN->data.F32[i] = source->peak->counts;
     29        SN->data.F32[i] = source->peak->SN;
    3030    }
    3131    psVector *index = psVectorSortIndex (NULL, SN);
     
    7979        // threshold is fraction of the source peak flux
    8080        // image is background subtracted; source->moments->Sky should always be 0.0
    81         threshold = FRACTION * source->moments->Peak;
    82         // threshold is no less than NSIGMA above the local median sigma?
    83         threshold = PS_MAX (threshold, NSIGMA*sqrt(source->moments->dSky));
     81        threshold = FRACTION * source->peak->SN;
     82        // threshold is no less than NSIGMA
     83        threshold = PS_MAX (threshold, NSIGMA);
    8484
    8585        // generate a basic contour (set of x,y coordinates at-or-below flux level)
     
    9595        // the left boundary and xv[i+1] corresponding to the right boundary
    9696
     97        // a blend can only be associated with one primary source
     98
    9799        psVector *xv = contour->data[0];
    98100        psVector *yv = contour->data[1];
    99101        for (int k = 0; k < overlap->n; k++) {
    100102            testSource = overlap->data[k];
    101             if (testSource->peak->counts > source->peak->counts) continue;
     103            if (testSource->mode & PM_SOURCE_MODE_BLEND) continue;
     104            if (testSource->peak->value > source->peak->value) continue;
    102105            for (int j = 0; j < xv->n; j+=2) {
    103106                if (fabs(yv->data.F32[j] - testSource->peak->y) > 0.5) continue;
Note: See TracChangeset for help on using the changeset viewer.