Index: trunk/ppSub/src/ppSubReadout.c
===================================================================
--- trunk/ppSub/src/ppSubReadout.c	(revision 20519)
+++ trunk/ppSub/src/ppSubReadout.c	(revision 20523)
@@ -355,4 +355,27 @@
         outRO->data_exists = outCell->data_exists = outCell->parent->data_exists = true;
 
+        if (psMetadataLookupBool(&mdok, recipe, "RENORM")) {
+            // Statistics for renormalisation
+            psStatsOptions renormMean = psStatsOptionFromString(psMetadataLookupStr(NULL, recipe,
+                                                                                    "RENORM.MEAN"));
+            psStatsOptions renormStdev = psStatsOptionFromString(psMetadataLookupStr(NULL, recipe,
+                                                                                     "RENORM.STDEV"));
+            if (renormMean == PS_STAT_NONE || renormStdev == PS_STAT_NONE) {
+                psError(PS_ERR_BAD_PARAMETER_VALUE, false,
+                        "Unable to parse renormalisation statistics from recipe.");
+                psFree(outRO);
+                return false;
+            }
+            int renormNum = psMetadataLookupS32(&mdok, recipe, "RENORM.NUM"); // Number of samples
+            float renormWidth = psMetadataLookupS32(&mdok, recipe, "RENORM.WIDTH"); // Width of Gaussian phot
+            psMaskType maskValue = pmConfigMaskGet("BLANK", config); // Bits to mask
+            if (!pmReadoutWeightRenormPhot(outRO, maskValue, renormNum, renormWidth,
+                                           renormMean, renormStdev, NULL)) {
+                psError(PS_ERR_UNKNOWN, false, "Unable to renormalise variances.");
+                psFree(outRO);
+                return false;
+            }
+        }
+
         pmFPAfile *photFile = psMetadataLookupPtr(NULL, config->files, "PSPHOT.INPUT");
         pmFPACopy(photFile->fpa, outRO->parent->parent->parent);
@@ -362,12 +385,16 @@
         // scratch.
 
+        if (psMetadataLookupBool(&mdok, recipe, "PSPHOT.VISUAL")) {
+            psphotSetVisual(true);
+        }
+
         // Need to ensure aperture residual is not calculated
-        psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PSPHOT_RECIPE); // Recipe
-        if (!recipe) {
+        psMetadata *psphotRecipe = psMetadataLookupMetadata(NULL, config->recipes, PSPHOT_RECIPE); // Recipe
+        if (!psphotRecipe) {
             psError(PS_ERR_UNEXPECTED_NULL, false, "Unable to find %s recipe.", PSPHOT_RECIPE);
             return false;
         }
-        const char *breakpoint = psMetadataLookupStr(&mdok, recipe, "BREAK_POINT"); // Current break point
-        psMetadataAddStr(recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE,
+        const char *breakpoint = psMetadataLookupStr(&mdok, psphotRecipe, "BREAK_POINT"); // Current break point
+        psMetadataAddStr(psphotRecipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE,
                          "ALTERED break point for psphot operations", "PSFMODEL");
 
@@ -375,6 +402,6 @@
         psMaskType maskValue = maskVal;
         psMaskType markValue = pmConfigMaskGet("MARK.VALUE", config); // Bits to use for marking
-        psMetadataAddU8(recipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "Bits to mask", maskValue);
-        psMetadataAddU8(recipe, PS_LIST_TAIL, "MARK.PSPHOT", PS_META_REPLACE, "Bits to use for marking",
+        psMetadataAddU8(psphotRecipe, PS_LIST_TAIL, "MASK.PSPHOT", PS_META_REPLACE, "Bits to mask", maskValue);
+        psMetadataAddU8(psphotRecipe, PS_LIST_TAIL, "MARK.PSPHOT", PS_META_REPLACE, "Bits to use for marking",
                         markValue);
 
@@ -386,5 +413,5 @@
 
         if (breakpoint) {
-            psMetadataAddStr(recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE,
+            psMetadataAddStr(psphotRecipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_REPLACE,
                              "RESTORED break point for psphot operations", breakpoint);
         }
