Index: trunk/ppStack/src/ppStackCombineFinal.c
===================================================================
--- trunk/ppStack/src/ppStackCombineFinal.c	(revision 33093)
+++ 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)
