IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 2, 2012, 11:18:35 AM (14 years ago)
Author:
eugene
Message:

attempt to reinsert sources on the second pass (actually on the "not-first-pass"). However, it is not an error for no sources to be present if no sources are added and/or subtracted, the significance image will not be regenerated

File:
1 edited

Legend:

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

    r34418 r34492  
    7171    }
    7272
     73    // first pass vs other: if this is the first pass, the code will use PEAKS_NSIGMA_LIMIT and
     74    // only attempt to detect PEAKS_NMAX entries.  If 'firstPass' is false, the code will
     75    // attempt to replace the subtracted sources in order to measure the footprints.  After
     76    // replacement, it is necessary to regenerate the significance image.  If no sources are
     77    // available, the code will skip the significance image regeneration step.
     78
    7379    bool replaceSourcesForFootprints = false;
    7480    if (firstPass) {
     
    126132    if (useFootprints) {
    127133        if (replaceSourcesForFootprints) {
     134            bool modified = false;
    128135            // subtract the noise for all sources including satstars
    129             psphotAddOrSubNoiseReadout(config, view, filerule, index, recipe, false);
    130             psphotReplaceAllSourcesReadout (config, view, filerule, index, recipe, false);
     136            modified |= psphotAddOrSubNoiseReadout(config, view, filerule, index, recipe, false);
     137            modified | psphotReplaceAllSourcesReadout (config, view, filerule, index, recipe, false);
    131138
    132139            // add in the satstars
    133             psphotAddOrSubSatstarsReadout (config, view, filerule, index, recipe, true);
     140            modified |= psphotAddOrSubSatstarsReadout (config, view, filerule, index, recipe, true);
    134141
    135             psFree (significance);
    136             significance = psphotSignificanceImage (readout, recipe, maskVal);
     142            if (modified) {
     143                psFree (significance);
     144                significance = psphotSignificanceImage (readout, recipe, maskVal);
     145            }
    137146
    138147            // display the significance image
Note: See TracChangeset for help on using the changeset viewer.