Index: trunk/ppStack/src/ppStackMatch.c
===================================================================
--- trunk/ppStack/src/ppStackMatch.c	(revision 14764)
+++ trunk/ppStack/src/ppStackMatch.c	(revision 14811)
@@ -11,5 +11,6 @@
 //#define TESTING
 
-bool ppStackMatch(pmReadout *output, const pmReadout *input, const pmConfig *config)
+bool ppStackMatch(pmReadout *output, const pmReadout *input, const pmReadout *sourcesRO,
+                  const pmConfig *config)
 {
     // Look up appropriate values from the ppSub recipe
@@ -51,8 +52,11 @@
     }
 
+    psArray *sources = psMetadataLookupPtr(&mdok, sourcesRO->analysis, "PSPHOT.SOURCES"); // Sources in image
+
     // Do the image matching
-    if (!pmSubtractionMatch(output, input, NULL, footprint, regionSize, spacing, threshold, stampsName,
-                            target, type, size, order, widths, orders, inner, ringsOrder, binning, optimum,
-                            optWidths, optOrder, optThresh, iter, rej, maskBad, maskBlank)) {
+    if (!pmSubtractionMatch(output, input, NULL, footprint, regionSize, spacing, threshold, sources,
+                            stampsName, target, type, size, order, widths, orders, inner, ringsOrder,
+                            binning, optimum, optWidths, optOrder, optThresh, iter, rej, maskBad,
+                            maskBlank)) {
         psError(PS_ERR_UNKNOWN, false, "Unable to match images.");
         return false;
