IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 24, 2007, 3:27:44 PM (19 years ago)
Author:
rhl
Message:

Added pmFootprint support

File:
1 edited

Legend:

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

    r12950 r13012  
    2020    PS_ASSERT_PTR_NON_NULL (breakPt, false);
    2121
     22    // Use the new pmFootprints approach?
     23    const bool useFootprints = psMetadataLookupBool(NULL, recipe, "USE_FOOTPRINTS");
     24
    2225    // generate mask & weight images if they don't already exit
    2326    if (!pmReadoutGenerateMaskWeight (readout, true)) {
     
    5861
    5962    // find the peaks in the image
    60     psArray *peaks = psphotFindPeaks (readout, recipe, 1);
     63    psArray *peaks;
     64    if (useFootprints) {
     65       psArray *footprints = psphotFindPeaks (readout, recipe, useFootprints, 1);
     66       peaks = pmFootprintArrayToPeaks(footprints);
     67       psFree(footprints);
     68    } else {
     69       peaks = psphotFindPeaks (readout, recipe, useFootprints, 1);
     70    }
     71
    6172    if (!peaks) {
    6273        psLogMsg ("psphot", 3, "unable to find peaks in this image");
     
    146157
    147158    // find the peaks in the image
    148     psArray *newPeaks = psphotFindPeaks (readout, recipe, 2);
     159    psArray *newPeaks;
     160    if (useFootprints) {
     161       psArray *newFootprints = psphotFindPeaks (readout, recipe, useFootprints, 2);
     162
     163       psphotCullPeaks(readout, recipe, newFootprints);
     164
     165       newPeaks = pmFootprintArrayToPeaks(newFootprints);
     166
     167       psFree(newFootprints);
     168    } else {
     169       newPeaks = psphotFindPeaks(readout, recipe, useFootprints, 2);
     170    }
    149171
    150172    // remove noise for subtracted objects
     
    186208
    187209    // calculate source magnitudes
    188     pmReadout *background = psphotSelectBackground (config, view);
     210    pmReadout *background = psphotSelectBackground (config, view, false);
    189211    psphotMagnitudes(sources, recipe, psf, background);
    190212
Note: See TracChangeset for help on using the changeset viewer.