Index: trunk/ppStack/src/ppStackArguments.c
===================================================================
--- trunk/ppStack/src/ppStackArguments.c	(revision 17006)
+++ trunk/ppStack/src/ppStackArguments.c	(revision 17255)
@@ -83,4 +83,18 @@
 }
 
+// Get a statistic name from the command-line or recipe, and add the enum to the arguments
+#define VALUE_ARG_RECIPE_STAT(ARGNAME, RECIPENAME) { \
+    const char *stat = psMetadataLookupStr(NULL, arguments, ARGNAME); \
+    if (!stat) { \
+        stat = psMetadataLookupStr(NULL, recipe, RECIPENAME); \
+        if (!stat) { \
+            psError(PS_ERR_BAD_PARAMETER_VALUE, false, "Unable to find %s in recipe %s", \
+                    RECIPENAME, PPSTACK_RECIPE); \
+            goto ERROR; \
+        } \
+    } \
+    psMetadataAddS32(config->arguments, PS_LIST_TAIL, RECIPENAME, 0, NULL, psStatsOptionFromString(stat)); \
+}
+
 // Get a string value from the command-line and add it to the target
 static bool valueArgStr(psMetadata *arguments, // Command-line arguments
@@ -141,4 +155,8 @@
     psMetadataAddBool(arguments, PS_LIST_TAIL, "-variance", 0, "Use variance for rejection?", false);
     psMetadataAddBool(arguments, PS_LIST_TAIL, "-safe", 0, "Play safe with small numbers of pixels to combine?", false);
+    psMetadataAddBool(arguments, PS_LIST_TAIL, "-renorm", 0, "Renormalise variance maps?", false);
+    psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-mean", 0, "Statistic for mean in renormalisation", NULL);
+    psMetadataAddStr(arguments, PS_LIST_TAIL, "-renorm-stdev", 0, "Statistic for stdev in renormalisation", NULL);
+    psMetadataAddS32(arguments, PS_LIST_TAIL, "-renorm-width", 0, "Width of renormalisation boxes", 0);
     psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-image", 0, "Suffix for temporary images", NULL);
     psMetadataAddStr(arguments, PS_LIST_TAIL, "-temp-mask", 0, "Suffix for temporary masks", NULL);
@@ -208,4 +226,12 @@
     }
 
+    if (psMetadataLookupBool(NULL, arguments, "-renorm") ||
+        psMetadataLookupBool(NULL, recipe, "RENORM")) {
+        psMetadataAddBool(config->arguments, PS_LIST_TAIL, "RENORM", 0, "Renormalise variance maps?", true);
+    }
+    VALUE_ARG_RECIPE_INT("-renorm-width", "RENORM.WIDTH", S32, 0);
+    VALUE_ARG_RECIPE_STAT("-renorm-mean", "RENORM.MEAN");
+    VALUE_ARG_RECIPE_STAT("-renorm-stdev", "RENORM.STDEV");
+
     valueArgRecipeStr(arguments, recipe, "-temp-image",  "TEMP.IMAGE",  config->arguments);
     valueArgRecipeStr(arguments, recipe, "-temp-mask",   "TEMP.MASK",   config->arguments);
@@ -218,5 +244,4 @@
     }
 
-
     psTrace("ppStack", 1, "Done reading command-line arguments\n");
     psFree(arguments);
@@ -227,4 +252,2 @@
     return false;
 }
-
-
