IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 17, 2012, 4:08:53 PM (14 years ago)
Author:
bills
Message:

Add option to find footprints on image without sources subtracted. This seems
to reduce the number of bad sources found during pass 2.
Also turn on KRON_SMOOTH

File:
1 edited

Legend:

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

    r33761 r33889  
    4848    // Use the new pmFootprints approach?
    4949    const bool useFootprints = psMetadataLookupBool(NULL, recipe, "USE_FOOTPRINTS");
     50    const bool footprintsUseUnsubtracted = psMetadataLookupBool(NULL, recipe, "FOOTPRINT_USE_UNSUBTRACTED");
    5051
    5152    pmDetections *detections = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.DETECTIONS");
     
    6465    }
    6566
     67    bool replaceSourcesForFootprints = false;
    6668    if (firstPass) {
    6769        pass = 1;
     
    7072    } else {
    7173        pass = 2;
     74        // XXX change this to a recipe value
     75        replaceSourcesForFootprints = footprintsUseUnsubtracted;   
    7276        NSIGMA_PEAK = psMetadataLookupF32 (&status, recipe, "PEAKS_NSIGMA_LIMIT_2"); PS_ASSERT (status, NULL);
    7377        NMAX = 0; // unlimited number of peaks in final pass: allow a limit (PEAKS_NMAX_2) ?
     
    116120    // optionally merge peaks into footprints
    117121    if (useFootprints) {
     122        if (replaceSourcesForFootprints) {
     123            psphotAddOrSubNoiseReadout(config, view, filerule, index, recipe, false);
     124            psphotReplaceAllSourcesReadout (config, view, filerule, index, recipe, false);
     125            psFree (significance);
     126            significance = psphotSignificanceImage (readout, recipe, maskVal);
     127        }
     128
    118129        psphotFindFootprints (detections, significance, readout, recipe, threshold, pass, maskVal);
     130
     131        if (replaceSourcesForFootprints) {
     132            psphotRemoveAllSourcesReadout (config, view, filerule, index, recipe, false);
     133        }
    119134    }
    120135
Note: See TracChangeset for help on using the changeset viewer.