IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
May 18, 2010, 11:02:08 AM (16 years ago)
Author:
Paul Price
Message:

Missed an occurence of FPA.OBS

File:
1 edited

Legend:

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

    r25881 r27992  
    165165    // generate the HDU, but only copies the structure.
    166166    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         }
     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        }
    184184    }
    185185
     
    307307
    308308        if (writeBlank || writeImage) {
    309             if (!pmConceptsWriteFPA(fpa, true, config)) {
     309            if (!pmConceptsWriteFPA(fpa, true, config)) {
    310310                psError(PS_ERR_IO, false, "Unable to write concepts for FPA.\n");
    311311                return false;
     
    341341//////////////////////////////////////////////////////////////////////////////////////////////////////////////
    342342
    343 // Update the FPA.OBS, CHIP.NAME and CELL.NAME in the FITS header, if required
     343// Update the CHIP.NAME and CELL.NAME in the FITS header, if required
    344344bool pmFPAUpdateNames(pmFPA *fpa, pmChip *chip, pmCell *cell, psS64 imageId, psS64 sourceId)
    345345{
     
    375375        psError(PS_ERR_UNKNOWN, true, "Unable to find FILE information in camera format.\n");
    376376        return false;
    377     }
    378     if (fpa) {
    379         const char *fpaObsHdr = psMetadataLookupStr(&mdok, fileData, "FPA.OBS");
    380         if (mdok && fpaObsHdr && strlen(fpaObsHdr) > 0) {
    381             const char *fpaObs = psMetadataLookupStr(NULL, fpa->concepts, "FPA.OBS");
    382             psMetadataAddStr(hduHigh->header, PS_LIST_TAIL, fpaObsHdr, PS_META_REPLACE,
    383                              "Observation identifier", fpaObs);
    384         }
    385377    }
    386378
Note: See TracChangeset for help on using the changeset viewer.