IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jul 30, 2009, 5:20:29 PM (17 years ago)
Author:
watersc1
Message:

Finished up my edits to the detrend cleanup, and some changes to my
copy of burntool and the pslib astrometry. Detrend cleanup has not
been tested yet. That's up next.

Location:
branches/czw_branch/cleanup
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/czw_branch/cleanup

  • branches/czw_branch/cleanup/psModules/src/camera/pmFPAWrite.c

    r23428 r24951  
    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
     
    724741    }
    725742    if (!psFitsCompressionApply(fits, compress)) {
    726         psError(PS_ERR_UNKNOWN, false, "Unable to set FITS compression to NONE");
     743        psError(PS_ERR_UNKNOWN, false, "Unable to restore FITS compression");
    727744        psFree(compress);
    728745        return false;
Note: See TracChangeset for help on using the changeset viewer.