IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 30222


Ignore:
Timestamp:
Jan 7, 2011, 2:20:29 PM (15 years ago)
Author:
eugene
Message:

add an assert to trigger on duplicate peaks, incase this is a possibility

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20101205/psModules/src/objects/pmFootprintAssignPeaks.c

    r30221 r30222  
    8888        fp->peaks = psArraySort(fp->peaks, pmPeakSortBySN);
    8989
    90         // XXX WHY am I culling duplicates?  how can there be duplicates?
     90        // XXX check for an assert on duplicates (I don't think they can happen, but
     91        // let's double check for now)
     92
     93        for (int j = 1; j < fp->peaks->n; j++) {
     94            psAssert (fp->peaks->data[j] != fp->peaks->data[j-1], "duplicate peak!");
     95        }
    9196        continue;
    9297
     98        // XXX WHY am I culling duplicates?  how can there be duplicates?
    9399        // XXX EAM : the algorithm below should be much faster than using psArrayRemove if
    94100        // the number of peaks in the footprint is large, or if there are no duplicates.
Note: See TracChangeset for help on using the changeset viewer.