IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26630


Ignore:
Timestamp:
Jan 19, 2010, 3:02:59 PM (16 years ago)
Author:
eugene
Message:

only cull peaks which have not previously been assigned to a source

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psModules/src/objects/pmFootprintCullPeaks.c

    r26628 r26630  
    117117        psFree(peakFootprint);
    118118
    119         // Check if any of the previous (brighter) peaks are within the footprint of this peak
    120         // If so, the current peak is bogus; drop it.
     119        // If this peak has not already been assigned to a source, then we can look for any
     120        // brighter peaks within its footprint. Check if any of the previous (brighter) peaks
     121        // are within the footprint of this peak If so, the current peak is bogus; drop it.
    121122        bool keep = true;
    122         for (int j = 0; keep && (j < brightPeaks->n); j++) {
     123        for (int j = 0; keep && !peak->assigned && (j < brightPeaks->n); j++) {
    123124            const pmPeak *peak2 = fp->peaks->data[j];
    124125            int x2 = peak2->x - subImg->col0;
    125126            int y2 = peak2->y - subImg->row0;
    126             if (idImg->data.S32[y2][x2] == IN_PEAK)
     127            if (idImg->data.S32[y2][x2] == IN_PEAK) {
    127128                // There's a brighter peak within the footprint above threshold; so cull our initial peak
    128129                keep = false;
     130            }
    129131        }
    130132        if (!keep) {
Note: See TracChangeset for help on using the changeset viewer.