IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 42214


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

Location:
branches/eam_branches/ipp-20220316/ppImage/src
Files:
3 edited

Legend:

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

    r42171 r42214  
    311311        }
    312312    }
    313 
     313    return true;
    314314}
    315315
  • branches/eam_branches/ipp-20220316/ppImage/src/ppImageRebinReadout.c

    r37406 r42214  
    3535
    3636            // run the rebin code
     37            // XXX EAM 2022.04.21 : this function rebins the signal image and makes an attempt to
     38            // generate a mask only with bits raised in masked pixels that have > 50% of input pixels masked.
     39            // this step is very expensive because it must count the input mask bits for each pixel.
     40            // What is particularly silly is that the mask is not even used in the jpeg image.
    3741            if (!pmReadoutRebin(outReadout, inReadout, options->maskValue, outFile->xBin, outFile->yBin)) {
    3842                psError(PS_ERR_UNKNOWN, false, "Unable to rebin readout.");
  • 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.