IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 14, 2010, 10:21:12 AM (17 years ago)
Author:
eugene
Message:

pmSourceMoments now takes the image mask; it is not not an error to find no peaks in an image

File:
1 edited

Legend:

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

    r25755 r26596  
    1313    psArray *peaks = pmPeaksInImage (significance, threshold);
    1414    if (peaks == NULL) {
    15         // XXX should we be sending back an empty array instead of NULL?
    16         // XXX this may also be due to a programming or config error
     15        // we only get a NULL peaks array due to a programming or config error.
     16        // this will result in a failure.
     17        psError(PSPHOT_ERR_DATA, false, "no peaks found in this image");
     18        return NULL;
     19    }
     20
     21    if (peaks->n == 0) {
    1722        // XXX do we need to set something in the readout->analysis to indicate that
    1823        // we tried and failed to find peaks (something in the header data)
    19         psError(PSPHOT_ERR_DATA, false, "no peaks found in this image");
    20         return false;
     24        psLogMsg ("psphot", PS_LOG_INFO, "no peaks found in this image");
     25        return peaks;
    2126    }
    2227
Note: See TracChangeset for help on using the changeset viewer.