Index: /trunk/ippconfig/gpc1/ppStack.config
===================================================================
--- /trunk/ippconfig/gpc1/ppStack.config	(revision 36716)
+++ /trunk/ippconfig/gpc1/ppStack.config	(revision 36717)
@@ -173,6 +173,7 @@
     COMBINE.DISCARD F32     0.2             # Discard fraction for Olympic weighted mean
     IMAGE.REJ       F32     0.1             # Rejected pixel fraction threshold for rejecting entire image
-    NMINPIX         S32     10              # Minimum input per pixel -- testing 
+    NMINPIX         S32     30              # Minimum input per pixel 
     MASK.VAL        STR     SUSPECT,MASK.VALUE,CONV.BAD,GHOST # Mask value of input bad pixels
+    MASK.BLANKBORDER S32    20              # Mask blank border in final stack output
 END
 
Index: /trunk/ippconfig/recipes/ppStack.config
===================================================================
--- /trunk/ippconfig/recipes/ppStack.config	(revision 36716)
+++ /trunk/ippconfig/recipes/ppStack.config	(revision 36717)
@@ -13,4 +13,5 @@
 MASK.BAD	STR	BLANK		# Mask value to give bad pixels
 MASK.POOR	STR	CONV.POOR	# Mask value to give poor pixels
+MASK.BLANKBORDER S32    0               # Mask blank border in final stack output (may want to set KERNEL.SIZE)
 
 # we are in some danger of inconsistency in the definition of a 'bad' vs a 'suspect' pixel
@@ -32,5 +33,5 @@
 TARGET.FRAC	F32	0.1		# Minimum flux fraction for target PSF
 TARGET.MINMAG	F32	3.0		# Minimum magnitude difference to tolerate in stamp
-NMINPIX		S32	1 		# Minimum input per pixel -- testing 
+NMINPIX		S32	1 		# Minimum input per pixel 
 
 BACKGROUND.MODEL    BOOL   FALSE        # Construct a stacked version of the warp stage background
Index: /trunk/ppStack/src/ppStackCombineFinal.c
===================================================================
--- /trunk/ppStack/src/ppStackCombineFinal.c	(revision 36716)
+++ /trunk/ppStack/src/ppStackCombineFinal.c	(revision 36717)
@@ -3,4 +3,43 @@
 // This is the doomsday switch.
 // #define TESTING                         // Enable test output
+
+//MEH -- adhoc addition to blank mask border of final stack since rejection different/none on order of KERNEL.SIZE with overlap in CombineInitial 
+static void stackBorderMask(psImage *image, // Image to mark as blank
+                            psImage *mask, // Mask to mark as blank (or NULL)
+                            psImage *variance, // Weight map to mark as blank (or NULL)
+                            int numCols, int numRows, // Size of image
+                            int size, // Size to mark blank
+                            psImageMaskType blank // Blank mask value
+    )
+{
+    for (int y = size; y < numRows - size; y++) {
+        for (int x = 0; x < size; x++) {
+            image->data.F32[y][x] = NAN;
+            mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank;
+            variance->data.F32[y][x] = NAN;
+        }
+        for (int x = numCols - size; x < numCols; x++) {
+            image->data.F32[y][x] = NAN;
+            mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank;
+            variance->data.F32[y][x] = NAN;
+        }
+    }
+    for (int y = 0; y < size; y++) {
+        for (int x = 0; x < numCols; x++) {
+            image->data.F32[y][x] = NAN;
+            mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank;
+            variance->data.F32[y][x] = NAN;
+        }
+    }
+    for (int y = numRows - size; y < numRows; y++) {
+        for (int x = 0; x < numCols; x++) {
+            image->data.F32[y][x] = NAN;
+            mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = blank;
+            variance->data.F32[y][x] = NAN;
+        }
+    }
+    return;
+}
+
 
 bool ppStackCombineFinal(ppStackThreadData *stack, psArray *covariances, ppStackOptions *options,
@@ -20,4 +59,7 @@
     psAssert(recipe, "We've thrown an error on this before.");
     float poorFrac = psMetadataLookupF32(NULL, recipe, "POOR.FRACTION"); // Fraction for "poor"
+
+    int sizeBlank = psMetadataLookupS32(NULL, recipe, "MASK.BLANKBORDER"); // Pixels to mask BLANK from edge 
+    psImageMaskType maskBlank = pmConfigMaskGet("BLANK", config); // Bits to mask for bad pixels
 
     // Grow the list of rejected pixels, if desired
@@ -109,4 +151,10 @@
 #endif
 
+    //MEH blank mask/manual reject border on final stack -- 
+    if (sizeBlank > 0) {
+        stackBorderMask(outRO->image,outRO->mask,outRO->variance,numCols,numRows,sizeBlank,maskBlank);
+        stackBorderMask(expRO->image,expRO->mask,expRO->variance,numCols,numRows,sizeBlank,0);
+    }
+
     if (options->stats) {
         // only add the timer if it has not been set (convolved stack)
