IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 26633


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

we were not merging the old footprints with the new footprints -- this did not mess up the sources, but the culled footprints were being freed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/20091201/psphot/src/psphotFindFootprints.c

    r25755 r26633  
    4141    if (pass == 2) {
    4242        // merge in old peaks;
    43         const int includePeaks = 0x0 | 0x2; // i.e. just from newFootprints
    44 
    45         // XXX EAM : still not sure I understand this: are we double-couning or undercounting peaks
     43        const int includePeaks = 0x1 | 0x2; // i.e. both new and old footprints
    4644
    4745        psArray *mergedFootprints = pmFootprintArraysMerge(detections->footprints, footprints, includePeaks);
     
    5048        psFree(footprints);
    5149        psFree(detections->footprints);
     50
     51        // replace the merged footprints on the detection structure
    5252        detections->footprints = mergedFootprints;
    5353    } else {
     
    6161    return detections;
    6262}
     63
     64bool psphotCheckFootprints (pmDetections *detections) {
     65
     66    // check for messed up footprints in the old peaks
     67    for (int i = 0; i < detections->oldPeaks->n; i++) {
     68        pmPeak *peak = detections->oldPeaks->data[i];
     69        pmFootprint *footprint = peak->footprint;
     70        if (!footprint) continue;
     71        for (int j = 0; j < footprint->spans->n; j++) {
     72            pmSpan *sp = footprint->spans->data[j];
     73            psAssert (sp, "missing span");
     74        }
     75    }
     76    return true;
     77}
Note: See TracChangeset for help on using the changeset viewer.