Index: trunk/ppStack/src/ppStackMatch.c
===================================================================
--- trunk/ppStack/src/ppStackMatch.c	(revision 16834)
+++ trunk/ppStack/src/ppStackMatch.c	(revision 16851)
@@ -13,4 +13,5 @@
 
 //#define TESTING
+#define NO_CONVOLUTION
 
 bool ppStackMatch(pmReadout *readout, psArray **regions, psArray **kernels,
@@ -24,8 +25,12 @@
     assert(config);
 
+    pmReadout *output = pmReadoutAlloc(NULL); // Output readout, for holding results temporarily
+
     // Look up appropriate values from the ppSub recipe
-    bool mdok;                          // Status of MD lookup
     psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, "PPSUB"); // PPSUB recipe
     int size = psMetadataLookupS32(NULL, recipe, "KERNEL.SIZE"); // Kernel half-size
+
+#ifndef NO_CONVOLUTION
+    bool mdok;                          // Status of MD lookup
     int order = psMetadataLookupS32(NULL, recipe, "SPATIAL.ORDER"); // Spatial polynomial order
     float regionSize = psMetadataLookupF32(NULL, recipe, "REGION.SIZE"); // Size of iso-kernel regs
@@ -83,4 +88,5 @@
         psFree(fake);
         psFree(optWidths);
+        psFree(output);
         return false;
     }
@@ -95,5 +101,4 @@
 
     // Do the image matching
-    pmReadout *output = pmReadoutAlloc(NULL); // Output readout, for holding results temporarily
     if (!pmSubtractionMatch(output, NULL, readout, fake, footprint, regionSize, spacing, threshold,
                             sources, stampsName, type, size, order, widths, orders, inner, ringsOrder,
@@ -116,4 +121,26 @@
     readout->mask   = psMemIncrRefCounter(output->mask);
     readout->weight = psMemIncrRefCounter(output->weight);
+
+#else  // NO_CONVOLUTION
+    // Fake the convolution
+    {
+        psRegion *region = psRegionAlloc(0, 0, readout->image->numCols - 1, readout->image->numRows - 1);
+        psMetadataAddPtr(output->analysis, PS_LIST_TAIL, PM_SUBTRACTION_ANALYSIS_REGION, PS_META_DUPLICATE_OK,
+                         "Fake subtraction region", region);
+        psFree(region);
+        pmSubtractionKernels *kernels = pmSubtractionKernelsPOIS(size, 0, PM_SUBTRACTION_MODE_1);
+        // Set solution to delta function
+        kernels->solution1 = psVectorAlloc(kernels->num + 1, PS_TYPE_F64);
+        psVectorInit(kernels->solution1, 0.0);
+        for (int i = 0; i < kernels->num; i++) {
+            if (kernels->u->data.S32[i] == 0 && kernels->v->data.S32[i] == 0) {
+                kernels->solution1->data.F64[i] = 1.0;
+            }
+        }
+        psMetadataAddPtr(output->analysis, PS_LIST_TAIL, PM_SUBTRACTION_ANALYSIS_KERNEL, PS_META_DUPLICATE_OK,
+                         "Fake subtraction kernel", kernels);
+        psFree(kernels);
+    }
+#endif
 
     // Extract the regions and solutions used in the image matching
