- Timestamp:
- Feb 2, 2009, 8:05:38 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/pap_branch_20090128/psModules/src/camera/pmFPAWrite.c
r21211 r21264 29 29 FPA_WRITE_TYPE_IMAGE, // Write image 30 30 FPA_WRITE_TYPE_MASK, // Write mask 31 FPA_WRITE_TYPE_VARIANCE // Write variance map31 FPA_WRITE_TYPE_VARIANCE // Write variance map 32 32 } fpaWriteType; 33 33 … … 74 74 } 75 75 76 77 78 79 // Some type-specific additions to the header 80 static bool writeUpdateHeader(pmFPA *fpa, // FPA of interest 81 pmChip *chip, // Chip of interest, or NULL 82 pmCell *cell, // Cell of interest, or NULL 83 fpaWriteType type // Type to write 84 ) 85 { 86 switch (type) { 87 case FPA_WRITE_TYPE_MASK: { 88 pmHDU *phu = pmHDUGetHighest(fpa, chip, cell); // Primary header 89 if (!pmConfigMaskWriteHeader(config, phu->header)) { 90 psError(PS_ERR_UNKNOWN, false, "Unable to set the mask names in the PHU header"); 91 return false; 92 } 93 break; 94 } 95 case FPA_WRITE_TYPE_VARIANCE: { 96 pmHDU *hdu = pmHDUGetLowest(fpa, chip, cell); // Header being written 97 98 99 76 100 // Write a cell image/mask/variance 77 101 static bool cellWrite(pmCell *cell, // Cell to write … … 97 121 // generate the HDU, but only copies the structure. 98 122 if (!blank && !hdu->blankPHU && !*imageArray && (!pmHDUGenerateForCell(cell) || !*imageArray)) { 99 psError(PS_ERR_UNKNOWN, false, "Unable to generate HDU for cell --- likely programming error. \n");123 psError(PS_ERR_UNKNOWN, false, "Unable to generate HDU for cell --- likely programming error."); 100 124 return false; 101 125 } … … 106 130 107 131 if (writeBlank || writeImage) { 108 109 132 pmFPAUpdateNames(cell->parent->parent, cell->parent, cell); 110 133 pmConceptSource source = PM_CONCEPT_SOURCE_HEADER | PM_CONCEPT_SOURCE_CELLS | 111 134 PM_CONCEPT_SOURCE_DEFAULTS | PM_CONCEPT_SOURCE_DATABASE; 112 135 if (!pmConceptsWriteCell(cell, source, true, config)) { 113 psError(PS_ERR_IO, false, "Unable to write concepts for cell. \n");136 psError(PS_ERR_IO, false, "Unable to write concepts for cell."); 114 137 return false; 115 138 } 139 140 116 141 if (!appropriateWriteFunc(hdu, fits, config, type)) { 117 142 psError(PS_ERR_IO, false, "Unable to write HDU for cell.\n");
Note:
See TracChangeset
for help on using the changeset viewer.
