IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 33910 for trunk


Ignore:
Timestamp:
May 24, 2012, 3:37:59 PM (14 years ago)
Author:
bills
Message:

Fix lingering duplicate source problem with psphotStack.
In psphotSourceChildren save the destination's footprint array
on the new container so that the footprints are available to be
merged with the footprints detected in pass 2. This allows
the duplicate peaks to be properly culled.

File:
1 edited

Legend:

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

    r33444 r33910  
    744744    psAssert (readoutOut, "missing readout?");
    745745
     746    pmDetections *detectionsOutOld = psMetadataLookupPtr (&status, readoutOut->analysis, "PSPHOT.DETECTIONS");
     747    psArray *oldFootprints = detectionsOutOld ? detectionsOutOld->footprints : NULL;
     748
    746749    // replace any existing DETECTION container on readoutOut->analysis with the new one
    747750    pmDetections *detectionsOut = pmDetectionsAlloc();
     751    if (oldFootprints) {
     752        // ... but hang on to any existing footprints so that they can be merged with new footprints in pass 2
     753        detectionsOut->footprints = psMemIncrRefCounter(oldFootprints);
     754    }
    748755    detectionsOut->allSources = psArrayAllocEmpty (100);
    749756    if (!psMetadataAddPtr (readoutOut->analysis, PS_LIST_TAIL, "PSPHOT.DETECTIONS", PS_META_REPLACE | PS_DATA_UNKNOWN, "psphot detections", detectionsOut)) {
Note: See TracChangeset for help on using the changeset viewer.