Index: /trunk/ppSub/src/ppSubArguments.c
===================================================================
--- /trunk/ppSub/src/ppSubArguments.c	(revision 18919)
+++ /trunk/ppSub/src/ppSubArguments.c	(revision 18920)
@@ -41,5 +41,5 @@
         } \
     } \
-    psMetadataAdd##TYPE(config->arguments, PS_LIST_TAIL, RECIPENAME, 0, NULL, value); \
+    psMetadataAdd##TYPE(recipe, PS_LIST_TAIL, RECIPENAME, PS_META_REPLACE, NULL, value); \
 }
 
@@ -56,5 +56,5 @@
         } \
     } \
-    psMetadataAdd##TYPE(config->arguments, PS_LIST_TAIL, RECIPENAME, 0, NULL, value); \
+    psMetadataAdd##TYPE(recipe, PS_LIST_TAIL, RECIPENAME, PS_META_REPLACE, NULL, value); \
 }
 
@@ -68,5 +68,5 @@
     psString value = psMetadataLookupStr(NULL, arguments, argName); // Value of interest
     if (value && strlen(value) > 0) {
-        return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value);
+        return psMetadataAddStr(target, PS_LIST_TAIL, mdName, PS_META_REPLACE, NULL, value);
     }
     return false;
@@ -91,5 +91,5 @@
         }
     }
-    return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value);
+    return psMetadataAddStr(target, PS_LIST_TAIL, mdName, PS_META_REPLACE, NULL, value);
 }
 
@@ -149,5 +149,5 @@
     }
 
-    psMetadataAddVector(target, PS_LIST_TAIL, recipeName, 0, NULL, vector);
+    psMetadataAddVector(target, PS_LIST_TAIL, recipeName, PS_META_REPLACE, NULL, vector);
     psFree(vector);                     // Drop reference
 
@@ -184,8 +184,11 @@
     psMetadataAddS32(arguments, PS_LIST_TAIL, "-size", 0, "Kernel half-size (pixels)", 0);
     psMetadataAddS32(arguments, PS_LIST_TAIL, "-order", 0, "Spatial polynomial order", -1);
-    psMetadataAddStr(arguments, PS_LIST_TAIL, "-type", 0, "Kernel type (ISIS|POIS|SPAM|FRIES|GUNK|RINGS)", NULL);
+    psMetadataAddStr(arguments, PS_LIST_TAIL, "-type", 0,
+                     "Kernel type (ISIS|POIS|SPAM|FRIES|GUNK|RINGS)", NULL);
     psMetadataAddF32(arguments, PS_LIST_TAIL, "-penalty", 0, "Penalty for wideness", NAN);
-    psMetadataAddStr(arguments, PS_LIST_TAIL, "-isis-widths", 0, "ISIS Gaussian FWHMs (comma-separated)", NULL);
-    psMetadataAddStr(arguments, PS_LIST_TAIL, "-isis-orders", 0, "ISIS polynomial orders (comma-separated)", NULL);
+    psMetadataAddStr(arguments, PS_LIST_TAIL, "-isis-widths", 0,
+                     "ISIS Gaussian FWHMs (comma-separated)", NULL);
+    psMetadataAddStr(arguments, PS_LIST_TAIL, "-isis-orders", 0,
+                     "ISIS polynomial orders (comma-separated)", NULL);
     psMetadataAddS32(arguments, PS_LIST_TAIL, "-rings-order", 0, "RINGS polynomial order", -1);
     psMetadataAddS32(arguments, PS_LIST_TAIL, "-inner", 0, "SPAM and FRIES inner radius", -1);
@@ -201,6 +204,8 @@
     psMetadataAddBool(arguments,  PS_LIST_TAIL, "-reverse", 0, "Reverse sense of subtraction?", false);
     psMetadataAddBool(arguments,  PS_LIST_TAIL, "-generate-mask", 0, "Generate mask if not supplied?", false);
-    psMetadataAddStr(arguments,  PS_LIST_TAIL, "-stamps", 0, "Stamps filename; file has x,y on each line", NULL);
-    psMetadataAddBool(arguments, PS_LIST_TAIL, "-opt", 0, "Derive optimum parameters for ISIS kernels?", false);
+    psMetadataAddStr(arguments,  PS_LIST_TAIL, "-stamps", 0,
+                     "Stamps filename; file has x,y on each line", NULL);
+    psMetadataAddBool(arguments, PS_LIST_TAIL, "-opt", 0,
+                      "Derive optimum parameters for ISIS kernels?", false);
     psMetadataAddF32(arguments, PS_LIST_TAIL, "-opt-min", 0, "Minimum value for optimum kernel search", NAN);
     psMetadataAddF32(arguments, PS_LIST_TAIL, "-opt-max", 0, "Minimum value for optimum kernel search", NAN);
@@ -221,24 +226,30 @@
     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Name of the output image", argv[3]);
 
-    const char *inMask = psMetadataLookupStr(NULL, config->arguments, "-inmask"); // Name of input mask
+    const char *inMask = psMetadataLookupStr(NULL, arguments, "-inmask"); // Name of input mask
     if (inMask && strlen(inMask) > 0) {
         fileList("INPUT.MASK", inMask, "Name of the input mask image", config);
     }
-    const char *inWeight = psMetadataLookupStr(NULL, config->arguments, "-inweight"); // Name of input weight
+    const char *inWeight = psMetadataLookupStr(NULL, arguments, "-inweight"); // Name of input weight
     if (inWeight && strlen(inWeight) > 0) {
         fileList("INPUT.WEIGHT", inWeight, "Name of the input weight image", config);
     }
 
-    const char *refMask = psMetadataLookupStr(NULL, config->arguments, "-refmask"); // Name of reference mask
+    const char *refMask = psMetadataLookupStr(NULL, arguments, "-refmask"); // Name of reference mask
     if (refMask && strlen(refMask) > 0) {
         fileList("REF.MASK", refMask, "Name of the reference mask image", config);
     }
-    const char *refWeight = psMetadataLookupStr(NULL, config->arguments, "-refweight"); // Name of ref weight
+    const char *refWeight = psMetadataLookupStr(NULL, arguments, "-refweight"); // Name of ref weight
     if (refWeight && strlen(refWeight) > 0) {
         fileList("REF.WEIGHT", refWeight, "Name of the reference weight image", config);
     }
 
-    if (psMetadataLookupBool(NULL, config->arguments, "-photometry")) {
-        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", 0, "Perform photometry?", true);
+    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
+    if (!recipe) {
+        psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find recipe %s", PPSUB_RECIPE);
+        return false;
+    }
+
+    if (psMetadataLookupBool(NULL, arguments, "-photometry")) {
+        psMetadataAddBool(recipe, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, "Perform photometry?", true);
     }
 
@@ -250,6 +261,8 @@
     assert(config);
 
-    valueArgStr(config->arguments, "-stats",  "STATS",  config->arguments);
-    valueArgStr(config->arguments, "-stamps", "STAMPS", config->arguments);
+    psMetadata *arguments = config->arguments; // Command-line arguments
+
+    valueArgStr(arguments, "-stats",  "STATS",  arguments);
+    valueArgStr(arguments, "-stamps", "STAMPS", arguments);
 
     psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
@@ -273,12 +286,12 @@
     VALUE_ARG_RECIPE_FLOAT("-penalty",    "PENALTY",         F32);
 
-    valueArgRecipeStr(config->arguments, recipe, "-mask-bad",   "MASK.BAD",   config->arguments);
-    valueArgRecipeStr(config->arguments, recipe, "-mask-blank", "MASK.BLANK", config->arguments);
-
-    vectorArgRecipe(config->arguments, "-isis-widths", recipe, "ISIS.WIDTHS", config->arguments, PS_TYPE_F32);
-    vectorArgRecipe(config->arguments, "-isis-orders", recipe, "ISIS.ORDERS", config->arguments, PS_TYPE_S32);
-
-    psVector *widths = psMetadataLookupPtr(NULL, config->arguments, "ISIS.WIDTHS"); // ISIS Gaussian widths
-    psVector *orders = psMetadataLookupPtr(NULL, config->arguments, "ISIS.ORDERS"); // ISIS Polynomial orders
+    valueArgRecipeStr(arguments, recipe, "-mask-bad",   "MASK.BAD",   recipe);
+    valueArgRecipeStr(arguments, recipe, "-mask-blank", "MASK.BLANK", recipe);
+
+    vectorArgRecipe(arguments, "-isis-widths", recipe, "ISIS.WIDTHS", recipe, PS_TYPE_F32);
+    vectorArgRecipe(arguments, "-isis-orders", recipe, "ISIS.ORDERS", recipe, PS_TYPE_S32);
+
+    psVector *widths = psMetadataLookupPtr(NULL, recipe, "ISIS.WIDTHS"); // ISIS Gaussian widths
+    psVector *orders = psMetadataLookupPtr(NULL, recipe, "ISIS.ORDERS"); // ISIS Polynomial orders
     if (widths->n != orders->n) {
         psError(PS_ERR_BAD_PARAMETER_SIZE, true, "Size of vectors for ISIS widths and orders do not match.");
@@ -286,7 +299,6 @@
     }
 
-    if (psMetadataLookupBool(NULL, config->arguments, "-opt") ||
-        psMetadataLookupBool(NULL, recipe, "OPTIMUM")) {
-        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "OPTIMUM", 0,
+    if (psMetadataLookupBool(NULL, arguments, "-opt") || psMetadataLookupBool(NULL, recipe, "OPTIMUM")) {
+        psMetadataAddBool(recipe, PS_LIST_TAIL, "OPTIMUM", PS_META_REPLACE,
                           "Derive optimum parameters for ISIS kernels?", true);
         VALUE_ARG_RECIPE_FLOAT("-opt-min", "OPTIMUM.MIN",   F32);
@@ -297,25 +309,24 @@
     }
 
-    psMetadataAddBool(config->arguments, PS_LIST_TAIL, "REVERSE", 0, "Reverse sense of subtraction",
-                      psMetadataLookupBool(NULL, config->arguments, "-reverse"));
-    psMetadataAddBool(config->arguments, PS_LIST_TAIL, "MASK.GENERATE", 0, "Generate mask if not supplied",
-                      psMetadataLookupBool(NULL, config->arguments, "-generate-mask"));
-    psMetadataAddBool(config->arguments, PS_LIST_TAIL, "DUAL", 0, "Dual convolution?",
-                      psMetadataLookupBool(NULL, config->arguments, "-dual"));
-
-    if (psMetadataLookupBool(NULL, config->arguments, "-renorm") ||
+    psMetadataAddBool(arguments, PS_LIST_TAIL, "REVERSE", 0, "Reverse sense of subtraction",
+                      psMetadataLookupBool(NULL, arguments, "-reverse"));
+    psMetadataAddBool(recipe, PS_LIST_TAIL, "MASK.GENERATE", PS_META_REPLACE, "Generate mask if not supplied",
+                      psMetadataLookupBool(NULL, arguments, "-generate-mask"));
+    psMetadataAddBool(recipe, PS_LIST_TAIL, "DUAL", PS_META_REPLACE, "Dual convolution?",
+                      psMetadataLookupBool(NULL, arguments, "-dual"));
+
+    if (psMetadataLookupBool(NULL, arguments, "-renorm") ||
         psMetadataLookupBool(NULL, recipe, "RENORM")) {
-        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "RENORM", 0, "Renormalise weights?", true);
+        psMetadataAddBool(recipe, PS_LIST_TAIL, "RENORM", PS_META_REPLACE, "Renormalise weights?", true);
         VALUE_ARG_RECIPE_INT("-renorm-width", "RENORM.WIDTH", S32, 0);
     }
 
-    if (psMetadataLookupBool(NULL, config->arguments, "-photometry") ||
-        psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
-        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE,
-                          "Perform photometry?", true);
+    // Need to update this because it could have been overwritten by the camera's own recipe
+    if (psMetadataLookupBool(NULL, arguments, "-photometry")) {
+        psMetadataAddBool(recipe, PS_LIST_TAIL, "PHOTOMETRY", PS_META_REPLACE, "Perform photometry?", true);
     }
 
     // Translate the kernel type
-    psString type = psMetadataLookupStr(NULL, config->arguments, "-type"); // Name of kernel type
+    psString type = psMetadataLookupStr(NULL, arguments, "-type"); // Name of kernel type
     if (!type || strlen(type) == 0) {
         type = psMetadataLookupStr(NULL, recipe, "KERNEL.TYPE");
@@ -325,12 +336,20 @@
         }
     }
-    pmSubtractionKernelsType kernelType = pmSubtractionKernelsTypeFromString(type); // Type of kernel
-    if (kernelType == PM_SUBTRACTION_KERNEL_NONE) {
-        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised kernel type: %s", type);
-        goto ERROR;
-    }
-    psMetadataAddS32(config->arguments, PS_LIST_TAIL, "KERNEL.TYPE", 0, "Type of kernel", kernelType);
+    psMetadataAddStr(recipe, PS_LIST_TAIL, "KERNEL.TYPE", PS_META_REPLACE, "Type of kernel", type);
 
     psTrace("ppSub", 1, "Done reading command-line arguments\n");
+
+    // Dump configuration, now that's it's settled
+    {
+        pmConfigCamerasCull(config);
+        pmConfigRecipesCull(config, "PPSUB,PPSTATS,PSPHOT,MASKS");
+
+        const char *outroot = psMetadataLookupStr(NULL, arguments, "OUTPUT"); // Output root name
+        psAssert(outroot, "Should be there, we put it there!");
+
+        pmFPAfile *input = psMetadataLookupPtr(NULL, config->files, "PPSUB.INPUT"); // Input file
+        pmConfigDump(config, input->fpa, outroot);
+    }
+
     return true;
 
Index: /trunk/ppSub/src/ppSubCamera.c
===================================================================
--- /trunk/ppSub/src/ppSubCamera.c	(revision 18919)
+++ /trunk/ppSub/src/ppSubCamera.c	(revision 18920)
@@ -143,7 +143,5 @@
 
     // psPhot input
-    if (psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY") ||
-        psMetadataLookupBool(NULL, recipe, "PHOTOMETRY") ) {
-        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "PHOTOMETRY", 0, "Perform photometry?", true);
+    if (psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
         psphotModelClassInit ();        // load implementation-specific models
         pmFPAfile *psphot = pmFPAfileDefineFromFPA(config, output->fpa, 1, 1, "PSPHOT.INPUT");
Index: /trunk/ppSub/src/ppSubLoop.c
===================================================================
--- /trunk/ppSub/src/ppSubLoop.c	(revision 18919)
+++ /trunk/ppSub/src/ppSubLoop.c	(revision 18920)
@@ -52,9 +52,4 @@
         psError(PS_ERR_UNEXPECTED_NULL, false, "Can't find output data!\n");
         return false;
-    }
-
-    bool doPhotom = false;
-    if (psMetadataLookup(config->arguments, "PSPHOT.PSF")) {
-        doPhotom = true;
     }
 
Index: /trunk/ppSub/src/ppSubReadout.c
===================================================================
--- /trunk/ppSub/src/ppSubReadout.c	(revision 18919)
+++ /trunk/ppSub/src/ppSubReadout.c	(revision 18920)
@@ -58,37 +58,49 @@
     PS_ASSERT_IMAGES_SIZE_EQUAL(input, reference, false);
 
-    // Look up appropriate values
+    // Look up recipe values
+    psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
+    psAssert(recipe, "We checked this earlier, so it should be here.");
+
+    const char *typeStr = psMetadataLookupStr(NULL, recipe, "KERNEL.TYPE"); // Kernel type
+    psAssert(typeStr, "We put it here in ppSubArguments.c");
+    pmSubtractionKernelsType type = pmSubtractionKernelsTypeFromString(typeStr); // Type of kernel
+    if (type == PM_SUBTRACTION_KERNEL_NONE) {
+        psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unrecognised kernel type: %s", typeStr);
+        psFree(inConv);
+        psFree(refConv);
+        psFree(outRO);
+        return false;
+    }
+
     bool mdok;                          // Status of MD lookup
-    int size = psMetadataLookupS32(NULL, config->arguments, "KERNEL.SIZE"); // Kernel half-size
-    int order = psMetadataLookupS32(NULL, config->arguments, "SPATIAL.ORDER"); // Spatial polynomial order
-    float regionSize = psMetadataLookupF32(NULL, config->arguments, "REGION.SIZE"); // Size of iso-kernel regs
-    float spacing = psMetadataLookupF32(NULL, config->arguments, "STAMP.SPACING"); // Typical stamp spacing
-    int footprint = psMetadataLookupS32(NULL, config->arguments, "STAMP.FOOTPRINT"); // Stamp half-size
-    float threshold = psMetadataLookupF32(NULL, config->arguments, "STAMP.THRESHOLD"); // Threshold for stmps
-    int iter = psMetadataLookupS32(NULL, config->arguments, "ITER"); // Rejection iterations
-    float rej = psMetadataLookupF32(NULL, config->arguments, "REJ"); // Rejection threshold
-    pmSubtractionKernelsType type = psMetadataLookupS32(NULL, config->arguments,
-                                                        "KERNEL.TYPE"); // Kernel type
+    int size = psMetadataLookupS32(NULL, recipe, "KERNEL.SIZE"); // Kernel half-size
+    int order = psMetadataLookupS32(NULL, recipe, "SPATIAL.ORDER"); // Spatial polynomial order
+    float regionSize = psMetadataLookupF32(NULL, recipe, "REGION.SIZE"); // Size of iso-kernel regs
+    float spacing = psMetadataLookupF32(NULL, recipe, "STAMP.SPACING"); // Typical stamp spacing
+    int footprint = psMetadataLookupS32(NULL, recipe, "STAMP.FOOTPRINT"); // Stamp half-size
+    float threshold = psMetadataLookupF32(NULL, recipe, "STAMP.THRESHOLD"); // Threshold for stmps
+    int iter = psMetadataLookupS32(NULL, recipe, "ITER"); // Rejection iterations
+    float rej = psMetadataLookupF32(NULL, recipe, "REJ"); // Rejection threshold
     bool reverse = psMetadataLookupBool(NULL, config->arguments, "REVERSE"); // Reverse sense of subtraction?
-    psVector *widths = psMetadataLookupPtr(NULL, config->arguments, "ISIS.WIDTHS"); // ISIS Gaussian widths
-    psVector *orders = psMetadataLookupPtr(NULL, config->arguments, "ISIS.ORDERS"); // ISIS Polynomial orders
-    int inner = psMetadataLookupS32(NULL, config->arguments, "INNER"); // Inner radius
-    int ringsOrder = psMetadataLookupS32(NULL, config->arguments, "RINGS.ORDER"); // RINGS polynomial order
-    int binning = psMetadataLookupS32(NULL, config->arguments, "SPAM.BINNING"); // Binning for SPAM kernel
-    float penalty = psMetadataLookupF32(NULL, config->arguments, "PENALTY"); // Penalty for wideness
+    psVector *widths = psMetadataLookupPtr(NULL, recipe, "ISIS.WIDTHS"); // ISIS Gaussian widths
+    psVector *orders = psMetadataLookupPtr(NULL, recipe, "ISIS.ORDERS"); // ISIS Polynomial orders
+    int inner = psMetadataLookupS32(NULL, recipe, "INNER"); // Inner radius
+    int ringsOrder = psMetadataLookupS32(NULL, recipe, "RINGS.ORDER"); // RINGS polynomial order
+    int binning = psMetadataLookupS32(NULL, recipe, "SPAM.BINNING"); // Binning for SPAM kernel
+    float penalty = psMetadataLookupF32(NULL, recipe, "PENALTY"); // Penalty for wideness
     psMaskType maskIn = pmConfigMaskGet("MASK.VALUE", config); // Bits to mask going in to pmSubtractionMatch
     psMaskType maskOut = pmConfigMaskGet("BLANK", config); // Bits to mask after pmSubtractionMatch
-    float badFrac = psMetadataLookupF32(NULL, config->arguments, "BADFRAC"); // Maximum bad fraction
+    float badFrac = psMetadataLookupF32(NULL, recipe, "BADFRAC"); // Maximum bad fraction
     const char *stampsName = psMetadataLookupStr(&mdok, config->arguments, "STAMPS"); // Filename for stamps
 
-    bool optimum = psMetadataLookupBool(&mdok, config->arguments, "OPTIMUM"); // Derive optimum parameters?
-    float optMin = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.MIN"); // Minimum width for search
-    float optMax = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.MAX"); // Maximum width for search
-    float optStep = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.STEP"); // Step for search
-    float optThresh = psMetadataLookupF32(&mdok, config->arguments, "OPTIMUM.TOL"); // Tolerance for search
-    int optOrder = psMetadataLookupS32(&mdok, config->arguments, "OPTIMUM.ORDER"); // Order for search
-    bool dual = psMetadataLookupBool(&mdok, config->arguments, "DUAL"); // Dual convolution?
-    bool renorm = psMetadataLookupBool(&mdok, config->arguments, "RENORM"); // Renormalise weights?
-    int renormWidth = psMetadataLookupS32(&mdok, config->arguments, "RENORM.WIDTH"); // Width for renormalise
+    bool optimum = psMetadataLookupBool(&mdok, recipe, "OPTIMUM"); // Derive optimum parameters?
+    float optMin = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.MIN"); // Minimum width for search
+    float optMax = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.MAX"); // Maximum width for search
+    float optStep = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.STEP"); // Step for search
+    float optThresh = psMetadataLookupF32(&mdok, recipe, "OPTIMUM.TOL"); // Tolerance for search
+    int optOrder = psMetadataLookupS32(&mdok, recipe, "OPTIMUM.ORDER"); // Order for search
+    bool dual = psMetadataLookupBool(&mdok, recipe, "DUAL"); // Dual convolution?
+    bool renorm = psMetadataLookupBool(&mdok, recipe, "RENORM"); // Renormalise weights?
+    int renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width for renormalise
 
     pmSubtractionMode mode = dual ? PM_SUBTRACTION_MODE_DUAL : PM_SUBTRACTION_MODE_UNSURE; // Subtraction mode
@@ -97,5 +109,5 @@
     int numCols = input->numCols, numRows = input->numRows; // Image dimensions
     if (!inRO->mask) {
-        if (psMetadataLookupBool(NULL, config->arguments, "MASK.GENERATE")) {
+        if (psMetadataLookupBool(NULL, recipe, "MASK.GENERATE")) {
             pmReadoutSetMask(inRO, pmConfigMaskGet("SAT", config), pmConfigMaskGet("BAD", config));
         } else {
@@ -105,5 +117,5 @@
     }
     if (!refRO->mask) {
-        if (psMetadataLookupBool(NULL, config->arguments, "MASK.GENERATE")) {
+        if (psMetadataLookupBool(NULL, recipe, "MASK.GENERATE")) {
             pmReadoutSetMask(refRO, pmConfigMaskGet("SAT", config), pmConfigMaskGet("BAD", config));
         } else {
@@ -220,5 +232,5 @@
     // Photometry stage 1: measure the PSF
     pmPSF *psf = NULL;                  // PSF for photometry
-    if (psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY")) {
+    if (psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
         outRO->image = psImageCopy(outRO->image, minuend->image, PS_TYPE_F32);
         if (minuend->weight) {
@@ -319,5 +331,5 @@
 
     // QA: photometry of known sources with measured PSF
-    if (sourcesRO && psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY")) {
+    if (sourcesRO && psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
         sources = psMetadataLookupPtr(&mdok, sourcesRO->analysis, "PSPHOT.SOURCES");
 
@@ -374,5 +386,5 @@
 
     // Photometry stage 2: find and measure sources on the subtracted image
-    if (psMetadataLookupBool(NULL, config->arguments, "PHOTOMETRY")) {
+    if (psMetadataLookupBool(NULL, recipe, "PHOTOMETRY")) {
         // The PSF should already be stored for the readout
         pmFPAfile *photFile = psMetadataLookupPtr(NULL, config->files, "PSPHOT.INPUT");
