Index: trunk/ppMerge/src/ppMergeOptions.c
===================================================================
--- trunk/ppMerge/src/ppMergeOptions.c	(revision 8847)
+++ trunk/ppMerge/src/ppMergeOptions.c	(revision 9325)
@@ -35,6 +35,9 @@
     options->scale = false;
     options->exptime = false;
+    options->shutter = false;
     options->sample = 1;
-    options->background = PS_STAT_SAMPLE_MEDIAN;
+    options->mean = PS_STAT_SAMPLE_MEDIAN;
+    options->stdev = PS_STAT_SAMPLE_STDEV;
+    options->shutterSize = 10;
     options->onOff = 0;
     options->combine = pmCombineParamsAlloc(PS_STAT_SAMPLE_MEAN);
@@ -72,22 +75,5 @@
         return 0;
     }
-    if (strcasecmp(stat, "MEAN") == 0 || strcasecmp(stat, "SAMPLE_MEAN") == 0) {
-        return PS_STAT_SAMPLE_MEAN;
-    }
-    if (strcasecmp(stat, "MEDIAN") == 0 || strcasecmp(stat, "SAMPLE_MEDIAN") == 0) {
-        return PS_STAT_SAMPLE_MEDIAN;
-    }
-    if (strcasecmp(stat, "ROBUST") == 0 || strcasecmp(stat, "ROBUST_MEDIAN") == 0) {
-        return PS_STAT_ROBUST_MEDIAN;
-    }
-    if (strcasecmp(stat, "FITTED") == 0 || strcasecmp(stat, "FITTED_MEAN") == 0) {
-        return PS_STAT_FITTED_MEAN;
-    }
-    if (strcasecmp(stat, "CLIPPED") == 0 || strcasecmp(stat, "CLIPPED_MEAN") == 0) {
-        return PS_STAT_CLIPPED_MEAN;
-    }
-
-    psError(PS_ERR_IO, true, "Unable to interpret statistic: %s\n", name);
-    return 0;
+    return psStatsOptionFromString(stat);
 }
 
@@ -143,6 +129,8 @@
     OPTION_PARSE(options->combine->nKeep,    recipe, "NKEEP",     S32 );
     OPTION_PARSE(options->combine->maskVal,  recipe, "MASKVAL",   S32 );
+    OPTION_PARSE(options->shutterSize,       recipe, "SHUTTERSIZE", S32 );
     options->combine->combine = parseStat(recipe, "COMBINE");
-    options->background       = parseStat(recipe, "BACKGROUND");
+    options->mean             = parseStat(recipe, "MEAN");
+    options->stdev            = parseStat(recipe, "STDEV");
 
     // Now the command-line options.  These are parameters that depend on what type of frame is being combined
@@ -155,16 +143,25 @@
             options->scale = false;
             options->exptime = false;
+            options->shutter = false;
         } else if (strcasecmp(type, "DARK") == 0) {
             options->zero = false;
             options->scale = false;
             options->exptime = true;
+            options->shutter = false;
         } else if (strcasecmp(type, "FLAT") == 0) {
             options->zero = false;
             options->scale = true;
             options->exptime = false;
+            options->shutter = false;
         } else if (strcasecmp(type, "FRINGE") == 0) {
             options->zero = true;
             options->scale = true;
             options->exptime = false;
+            options->shutter = false;
+        } else if (strcasecmp(type, "SHUTTER") == 0) {
+            options->zero = false;
+            options->scale = false;
+            options->exptime = false;
+            options->shutter = true;
         } else {
             psLogMsg(__func__, PS_LOG_WARN, "Unrecognised image type: %s --- assuming BIAS.\n", type);
@@ -172,4 +169,5 @@
             options->scale = false;
             options->exptime = false;
+            options->shutter = false;
         }
     } else {
