Changeset 41382 for trunk/ppSub/src/ppSubBackground.c
- Timestamp:
- Jun 23, 2020, 3:29:09 PM (6 years ago)
- File:
-
- 1 edited
-
trunk/ppSub/src/ppSubBackground.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ppSub/src/ppSubBackground.c
r29937 r41382 33 33 psAssert(psphotRecipe, "Need PSPHOT recipe for binning"); 34 34 35 bool doApplyMaskNaN = psMetadataLookupBool(&mdok, ppSubRecipe, "APPLY.PIXELNAN"); // NaN the pixels underneath masks 36 35 37 psImageMaskType maskBad = pmConfigMaskGet("BLANK", config); // Bits to mask 36 38 … … 64 66 for (int x = 0; x < numCols; x++) { 65 67 // special case 1: NAN the masked pixels 66 if (mask && mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskBad) { 68 if(doApplyMaskNaN) { 69 if (mask && mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] & maskBad) { 67 70 image->data.F32[y][x] = NAN; 68 71 continue; 69 } 70 // special case 1: NAN & mask pixels without a valid background model 72 } 73 } 74 // special case 2: NAN & mask pixels without a valid background model 71 75 float value = psImageUnbinPixel(x + 0.5, y + 0.5, modelImage, binning); // Background value 72 76 if (!isfinite(value)) {
Note:
See TracChangeset
for help on using the changeset viewer.
