Changeset 14295
- Timestamp:
- Jul 18, 2007, 11:53:21 AM (19 years ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubReadout.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubReadout.c
r14248 r14295 43 43 int numCols = input->numCols, numRows = input->numRows; // Image dimensions 44 44 if (!inRO->mask) { 45 inRO->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK); 46 psImageInit(inRO->mask, 0); 45 if (psMetadataLookupBool(NULL, config->arguments, "MASK.GENERATE")) { 46 pmReadoutSetMask(inRO, pmConfigMask("SAT", config), pmConfigMask("BAD", config)); 47 } else { 48 inRO->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK); 49 psImageInit(inRO->mask, 0); 50 } 47 51 } 48 52 if (!refRO->mask) { 49 refRO->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK); 50 psImageInit(refRO->mask, 0); 53 if (psMetadataLookupBool(NULL, config->arguments, "MASK.GENERATE")) { 54 pmReadoutSetMask(refRO, pmConfigMask("SAT", config), pmConfigMask("BAD", config)); 55 } else { 56 refRO->mask = psImageAlloc(numCols, numRows, PS_TYPE_MASK); 57 psImageInit(refRO->mask, 0); 58 } 51 59 } 52 60 … … 104 112 } 105 113 114 if (numRejected > 0) { 115 solution = pmSubtractionSolveEquation(solution, stamps); 116 if (!solution) { 117 psError(PS_ERR_UNKNOWN, false, "Unable to calculate least-squares equation."); 118 goto ERROR; 119 } 120 } 121 106 122 psImage *convImage = NULL, *convWeight = NULL, *convMask = NULL; // Convolved images 107 123 if (!pmSubtractionConvolve(&convImage, &convWeight, &convMask, refRO->image, refRO->weight, subMask, … … 130 146 outCell->data_exists = true; 131 147 outCell->parent->data_exists = true; 148 149 for (int y = 0; y < outRO->image->numRows; y++) { 150 for (int x = 0; x < outRO->image->numCols; x++) { 151 if (isnan(outRO->image->data.F32[y][x]) && !(outRO->mask->data.U8[y][x] & maskBlank)) { 152 printf("%d %d --> %d\n", x, y, outRO->mask->data.U8[y][x]); 153 } 154 } 155 } 132 156 133 157 if (!pmFPACopyConcepts(outCell->parent->parent, inRO->parent->parent->parent)) {
Note:
See TracChangeset
for help on using the changeset viewer.
