Changeset 36717
- Timestamp:
- May 1, 2014, 4:02:29 PM (12 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
ippconfig/gpc1/ppStack.config (modified) (1 diff)
-
ippconfig/recipes/ppStack.config (modified) (2 diffs)
-
ppStack/src/ppStackCombineFinal.c (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippconfig/gpc1/ppStack.config
r36710 r36717 173 173 COMBINE.DISCARD F32 0.2 # Discard fraction for Olympic weighted mean 174 174 IMAGE.REJ F32 0.1 # Rejected pixel fraction threshold for rejecting entire image 175 NMINPIX S32 10 # Minimum input per pixel -- testing175 NMINPIX S32 30 # Minimum input per pixel 176 176 MASK.VAL STR SUSPECT,MASK.VALUE,CONV.BAD,GHOST # Mask value of input bad pixels 177 MASK.BLANKBORDER S32 20 # Mask blank border in final stack output 177 178 END 178 179 -
trunk/ippconfig/recipes/ppStack.config
r36710 r36717 13 13 MASK.BAD STR BLANK # Mask value to give bad pixels 14 14 MASK.POOR STR CONV.POOR # Mask value to give poor pixels 15 MASK.BLANKBORDER S32 0 # Mask blank border in final stack output (may want to set KERNEL.SIZE) 15 16 16 17 # we are in some danger of inconsistency in the definition of a 'bad' vs a 'suspect' pixel … … 32 33 TARGET.FRAC F32 0.1 # Minimum flux fraction for target PSF 33 34 TARGET.MINMAG F32 3.0 # Minimum magnitude difference to tolerate in stamp 34 NMINPIX S32 1 # Minimum input per pixel -- testing35 NMINPIX S32 1 # Minimum input per pixel 35 36 36 37 BACKGROUND.MODEL BOOL FALSE # Construct a stacked version of the warp stage background -
trunk/ppStack/src/ppStackCombineFinal.c
r33093 r36717 3 3 // This is the doomsday switch. 4 4 // #define TESTING // Enable test output 5 6 //MEH -- adhoc addition to blank mask border of final stack since rejection different/none on order of KERNEL.SIZE with overlap in CombineInitial 7 static void stackBorderMask(psImage *image, // Image to mark as blank 8 psImage *mask, // Mask to mark as blank (or NULL) 9 psImage *variance, // Weight map to mark as blank (or NULL) 10 int numCols, int numRows, // Size of image 11 int size, // Size to mark blank 12 psImageMaskType blank // Blank mask value 13 ) 14 { 15 for (int y = size; y < numRows - size; y++) { 16 for (int x = 0; x < size; x++) { 17 image->data.F32[y][x] = NAN; 18 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank; 19 variance->data.F32[y][x] = NAN; 20 } 21 for (int x = numCols - size; x < numCols; x++) { 22 image->data.F32[y][x] = NAN; 23 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank; 24 variance->data.F32[y][x] = NAN; 25 } 26 } 27 for (int y = 0; y < size; y++) { 28 for (int x = 0; x < numCols; x++) { 29 image->data.F32[y][x] = NAN; 30 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank; 31 variance->data.F32[y][x] = NAN; 32 } 33 } 34 for (int y = numRows - size; y < numRows; y++) { 35 for (int x = 0; x < numCols; x++) { 36 image->data.F32[y][x] = NAN; 37 mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank; 38 variance->data.F32[y][x] = NAN; 39 } 40 } 41 return; 42 } 43 5 44 6 45 bool ppStackCombineFinal(ppStackThreadData *stack, psArray *covariances, ppStackOptions *options, … … 20 59 psAssert(recipe, "We've thrown an error on this before."); 21 60 float poorFrac = psMetadataLookupF32(NULL, recipe, "POOR.FRACTION"); // Fraction for "poor" 61 62 int sizeBlank = psMetadataLookupS32(NULL, recipe, "MASK.BLANKBORDER"); // Pixels to mask BLANK from edge 63 psImageMaskType maskBlank = pmConfigMaskGet("BLANK", config); // Bits to mask for bad pixels 22 64 23 65 // Grow the list of rejected pixels, if desired … … 109 151 #endif 110 152 153 //MEH blank mask/manual reject border on final stack -- 154 if (sizeBlank > 0) { 155 stackBorderMask(outRO->image,outRO->mask,outRO->variance,numCols,numRows,sizeBlank,maskBlank); 156 stackBorderMask(expRO->image,expRO->mask,expRO->variance,numCols,numRows,sizeBlank,0); 157 } 158 111 159 if (options->stats) { 112 160 // only add the timer if it has not been set (convolved stack)
Note:
See TracChangeset
for help on using the changeset viewer.
