Changeset 27992
- Timestamp:
- May 18, 2010, 11:02:08 AM (16 years ago)
- File:
-
- 1 edited
-
trunk/psModules/src/camera/pmFPAWrite.c (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psModules/src/camera/pmFPAWrite.c
r25881 r27992 165 165 // generate the HDU, but only copies the structure. 166 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 }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 } 184 184 } 185 185 … … 307 307 308 308 if (writeBlank || writeImage) { 309 if (!pmConceptsWriteFPA(fpa, true, config)) {309 if (!pmConceptsWriteFPA(fpa, true, config)) { 310 310 psError(PS_ERR_IO, false, "Unable to write concepts for FPA.\n"); 311 311 return false; … … 341 341 ////////////////////////////////////////////////////////////////////////////////////////////////////////////// 342 342 343 // Update the FPA.OBS,CHIP.NAME and CELL.NAME in the FITS header, if required343 // Update the CHIP.NAME and CELL.NAME in the FITS header, if required 344 344 bool pmFPAUpdateNames(pmFPA *fpa, pmChip *chip, pmCell *cell, psS64 imageId, psS64 sourceId) 345 345 { … … 375 375 psError(PS_ERR_UNKNOWN, true, "Unable to find FILE information in camera format.\n"); 376 376 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 }385 377 } 386 378
Note:
See TracChangeset
for help on using the changeset viewer.
