Changeset 21183 for trunk/ppImage/src
- Timestamp:
- Jan 26, 2009, 8:40:07 PM (17 years ago)
- Location:
- trunk/ppImage/src
- Files:
-
- 5 edited
-
ppImage.h (modified) (1 diff)
-
ppImageCleanup.c (modified) (1 diff)
-
ppImageLoop.c (modified) (4 diffs)
-
ppImageReplaceBackground.c (modified) (4 diffs)
-
ppImageSetMaskBits.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppImage/src/ppImage.h
r20774 r21183 58 58 59 59 // make values for abstract concepts of masking 60 ps MaskType maskValue; // apply this bit-mask to choose masked bits61 ps MaskType markValue; // apply this bit-mask to choose masked bits62 ps MaskType satMask; // Mask value to give saturated pixels63 ps MaskType badMask; // Mask value to give bad pixels64 ps MaskType flatMask; // Mask value to give bad flat pixels65 ps MaskType blankMask; // Mask value to give blank pixels60 psImageMaskType maskValue; // apply this bit-mask to choose masked bits 61 psImageMaskType markValue; // apply this bit-mask to choose masked bits 62 psImageMaskType satMask; // Mask value to give saturated pixels 63 psImageMaskType badMask; // Mask value to give bad pixels 64 psImageMaskType flatMask; // Mask value to give bad flat pixels 65 psImageMaskType blankMask; // Mask value to give blank pixels 66 66 67 67 // non-linear correction parameters -
trunk/ppImage/src/ppImageCleanup.c
r19928 r21183 23 23 // fprintf (stderr, "Found %d leaks at %s\n", Nleaks, "ppImage"); 24 24 25 fprintf(stderr, "Found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "ppImage"); 25 // fprintf(stderr, "Found %d leaks at %s\n", psMemCheckLeaks (0, NULL, NULL, false), "ppImage"); 26 fprintf(stderr, "Found %d leaks at %s\n", psMemCheckLeaks (0, NULL, stdout, false), "ppImage"); 26 27 27 28 return; -
trunk/ppImage/src/ppImageLoop.c
r20771 r21183 126 126 } 127 127 128 // measure various statistics for this image128 // measure various pixel-based statistics for this image 129 129 if (!ppImagePixelStats(config, stats, options, view)) { 130 ESCAPE("Unable to measures stats for image");130 ESCAPE("Unable to measures pixel stats for image"); 131 131 } 132 132 if (!ppImageMosaicChip(config, options, view, "PPIMAGE.CHIP", "PPIMAGE.OUTPUT")) { … … 209 209 } 210 210 211 // Write out summary statistics211 // Calculate summary statistics from FPA Metadata 212 212 if (!ppImageMetadataStats(config, stats, options)) { 213 ESCAPE("Unable to write statistics file.");213 ESCAPE("Unable to determine FPA-level metadata statistics."); 214 214 } 215 215 … … 218 218 ESCAPE("save failure for FPA"); 219 219 } 220 221 220 psFree(view); 222 221 … … 230 229 } 231 230 } 231 psFree (stats); 232 232 233 233 return true; -
trunk/ppImage/src/ppImageReplaceBackground.c
r20863 r21183 30 30 // XXX Should this be options->maskValue or options->maskValue & ~options->satMask? 31 31 // The latter will leave saturated pixels high 32 ps MaskType maskVal = options->maskValue;32 psImageMaskType maskVal = options->maskValue; 33 33 34 34 // user-defined masks to test for good/bad pixels (build from recipe list if not yet set) 35 psMetadataAdd U8(psphotRecipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", maskVal);35 psMetadataAddImageMask(psphotRecipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", maskVal); 36 36 37 37 // Since we are working on a chip-mosaicked image, there should only be a single cell and readout … … 146 146 if (!isfinite(value)) { 147 147 image->data.F32[y][x] = NAN; 148 mask->data.PS_TYPE_ MASK_DATA[y][x] |= options->badMask;148 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= options->badMask; 149 149 } else { 150 150 image->data.F32[y][x] -= value; … … 157 157 for (int y = 0; y < numRows; y++) { 158 158 for (int x = 0; x < numCols; x++) { 159 if (mask && mask->data.PS_TYPE_ MASK_DATA[y][x] & maskVal) {159 if (mask && mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskVal) { 160 160 image->data.F32[y][x] = 0.0; 161 161 } else { … … 163 163 if (!isfinite(value)) { 164 164 image->data.F32[y][x] = NAN; 165 mask->data.PS_TYPE_ MASK_DATA[y][x] |= options->badMask;165 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] |= options->badMask; 166 166 } else { 167 167 image->data.F32[y][x] -= value; -
trunk/ppImage/src/ppImageSetMaskBits.c
r18556 r21183 38 38 39 39 // set maskValue and markValue in the psphot recipe 40 psMetadataAdd U8(recipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", options->maskValue);41 psMetadataAdd U8(recipe, PS_LIST_TAIL, "MARK.PSPHOT", PS_META_REPLACE, "user-defined mask", options->markValue);40 psMetadataAddImageMask (recipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "user-defined mask", options->maskValue); 41 psMetadataAddImageMask (recipe, PS_LIST_TAIL, "MARK.PSPHOT", PS_META_REPLACE, "user-defined mask", options->markValue); 42 42 43 43 return true;
Note:
See TracChangeset
for help on using the changeset viewer.
