Index: trunk/ppStack/src/ppStackMatch.c
===================================================================
--- trunk/ppStack/src/ppStackMatch.c	(revision 15816)
+++ trunk/ppStack/src/ppStackMatch.c	(revision 15844)
@@ -12,5 +12,5 @@
 
 bool ppStackMatch(pmReadout *output, const pmReadout *input, const pmReadout *sourcesRO,
-                  const pmConfig *config)
+                  const pmPSF *psf, const pmConfig *config)
 {
     // Look up appropriate values from the ppSub recipe
@@ -46,5 +46,4 @@
     // These values are specified specifically for stacking
     const char *stampsName = psMetadataLookupStr(NULL, config->arguments, "STAMPS"); // Filename for stamps
-    float target = psMetadataLookupF32(NULL, config->arguments, "TARGET"); // Target PSF width
 
     psVector *optWidths = NULL;         // Vector with FWHMs for optimum search
@@ -66,6 +65,14 @@
         }
     }
-    pmReadout *fake = pmReadoutFakeFromSources(input->image->numCols, input->image->numRows,
-                                               sources, target, powf(10.0, -0.4 * maxMag));
+
+    pmReadout *fake = pmReadoutAlloc(NULL); // Fake readout with target PSF
+
+    if (!pmReadoutFakeFromSources(fake, input->image->numCols, input->image->numRows, sources, NULL, NULL,
+                                  psf, powf(10.0, -0.4 * maxMag), 0, false)) {
+        psError(PS_ERR_UNKNOWN, false, "Unable to generate fake image with target PSF.");
+        psFree(fake);
+        psFree(optWidths);
+        return false;
+    }
 
 #ifdef TESTING
