IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 19, 2022, 8:44:23 AM (4 years ago)
Author:
eugene
Message:

do not raise an error if the background cannot be modeled due to lack of pixels (quality error); add comment on Rebin Readout inefficiency; need to have a return value

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20220316/ppImage/src/ppImageReplaceBackground.c

    r41382 r42214  
    8181    if (!modelFile || !modelRO) {
    8282        if (!psphotModelBackgroundReadoutFileIndex(config, &roView, "PPIMAGE.CHIP", 0)) {
    83             psError(PS_ERR_UNKNOWN, false, "Unable to model background");
    84             return false;
     83            int lastError = psErrorCodeLast();
     84            if (lastError == PSPHOT_ERR_DATA) {
     85              // a data error in psphotModelBackground* means an empty or bad image: skip background subtraction
     86              psErrorStackPrint(stderr, "Unable to model background");
     87              psErrorClear();
     88              return true;
     89            } else {
     90              psError(PS_ERR_UNKNOWN, false, "Unable to model background");
     91              return false;
     92            }
    8593        }
    8694        // the model file should now at least be defined
Note: See TracChangeset for help on using the changeset viewer.