IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 12, 2009, 12:51:29 PM (17 years ago)
Author:
eugene
Message:

if image data is missing for MASK or VARIANCE type images, just skip the output

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psModules/src/camera/pmFPAWrite.c

    r23428 r24768  
    160160    psArray **imageArray = appropriateImageArray(hdu, type); // Array of images in the HDU
    161161
     162    // XXX detect missing variance & mask images...
     163
    162164    // Generate the HDU if needed --- this is required after a pmFPACopy, or similar, which does not
    163165    // generate the HDU, but only copies the structure.
    164     if (!blank && !hdu->blankPHU && !*imageArray && (!pmHDUGenerateForCell(cell) || !*imageArray)) {
    165         psError(PS_ERR_UNKNOWN, false, "Unable to generate HDU for cell --- likely programming error.");
    166         return false;
     166    if (!blank && !hdu->blankPHU && !*imageArray) {
     167        if (!pmHDUGenerateForCell(cell)) {
     168            psError(PS_ERR_UNKNOWN, false, "Unable to generate HDU for cell --- likely programming error.");
     169            return false;
     170        }
     171        if (!*imageArray) {
     172            if (type == FPA_WRITE_TYPE_IMAGE) {
     173                psError(PS_ERR_UNKNOWN, false, "Expected to write an image, but it is missing...programming error?.");
     174                return false;
     175            }
     176            if (type == FPA_WRITE_TYPE_MASK) {
     177                psWarning("No mask image for this cell; skipping");
     178            }
     179            if (type == FPA_WRITE_TYPE_VARIANCE) {
     180                psWarning("No variance image for this cell; skipping");
     181            }
     182            return true;
     183        }
    167184    }
    168185
Note: See TracChangeset for help on using the changeset viewer.