Index: trunk/psModules/src/imcombine/pmSubtraction.c
===================================================================
--- trunk/psModules/src/imcombine/pmSubtraction.c	(revision 20561)
+++ trunk/psModules/src/imcombine/pmSubtraction.c	(revision 20568)
@@ -1088,7 +1088,7 @@
 
 bool pmSubtractionConvolve(pmReadout *out1, pmReadout *out2, const pmReadout *ro1, const pmReadout *ro2,
-                           psImage *subMask, psMaskType maskBad, psMaskType maskPoor, float poorFrac,
-                           float sysError, const psRegion *region, const pmSubtractionKernels *kernels,
-                           bool doBG, bool useFFT)
+                           psImage *subMask, int stride, psMaskType maskBad, psMaskType maskPoor,
+                           float poorFrac, float sysError, const psRegion *region,
+                           const pmSubtractionKernels *kernels, bool doBG, bool useFFT)
 {
     int numCols = 0, numRows = 0;       // Image dimensions
@@ -1124,4 +1124,9 @@
         PS_ASSERT_IMAGE_SIZE(subMask, numCols, numRows, false);
     }
+    PS_ASSERT_INT_NONNEGATIVE(stride, false);
+    PS_ASSERT_FLOAT_LARGER_THAN_OR_EQUAL(poorFrac, 0.0, false);
+    PS_ASSERT_FLOAT_LESS_THAN_OR_EQUAL(poorFrac, 1.0, false);
+    PS_ASSERT_FLOAT_LARGER_THAN_OR_EQUAL(sysError, 0.0, false);
+    PS_ASSERT_FLOAT_LESS_THAN_OR_EQUAL(sysError, 1.0, false);
     if (region && psRegionIsNaN(*region)) {
         psString string = psRegionToString(*region);
@@ -1212,5 +1217,4 @@
 
     int size = kernels->size;           // Half-size of kernel
-    int fullSize = 2 * size + 1;        // Full size of kernel
 
     // Get region for convolution: [xMin:xMax,yMin:yMax]
@@ -1236,8 +1240,13 @@
     psImageConvolveSetThreads(false);
 
-    for (int j = yMin; j < yMax; j += fullSize) {
-        int ySubMax = PS_MIN(j + fullSize, yMax); // Range for subregion of interest
-        for (int i = xMin; i < xMax; i += fullSize) {
-            int xSubMax = PS_MIN(i + fullSize, xMax); // Range for subregion of interest
+    if (stride == 0) {
+        // Use the full size of the kernel
+        stride = 2 * size + 1;
+    }
+
+    for (int j = yMin; j < yMax; j += stride) {
+        int ySubMax = PS_MIN(j + stride, yMax); // Range for subregion of interest
+        for (int i = xMin; i < xMax; i += stride) {
+            int xSubMax = PS_MIN(i + stride, xMax); // Range for subregion of interest
 
             psRegion *subRegion = psRegionAlloc(i, xSubMax, j, ySubMax); // Bounds of subtraction
