Index: trunk/ppSub/src/ppSubArguments.c
===================================================================
--- trunk/ppSub/src/ppSubArguments.c	(revision 14107)
+++ trunk/ppSub/src/ppSubArguments.c	(revision 14193)
@@ -58,6 +58,5 @@
 
 // Get a string value from the command-line and add it to the target
-static bool valueArgStr(pmConfig *config,      // Configuration
-                        psMetadata *arguments, // Command-line arguments
+static bool valueArgStr(psMetadata *arguments, // Command-line arguments
                         const char *argName, // Argument name in the command-line arguments
                         const char *mdName, // Name for value in the metadata
@@ -72,7 +71,27 @@
 }
 
+// Get a string value from the command-line or recipe and add it to the target
+static bool valueArgRecipeStr(psMetadata *arguments, // Command-line arguments
+                              psMetadata *recipe, // Recipe
+                              const char *argName, // Argument name in the command-line arguments
+                              const char *mdName, // Name for value in the metadata
+                              psMetadata *target // Target metadata to which to add value
+                              )
+{
+    bool mdok;                          // Status of MD lookup
+    psString value = psMetadataLookupStr(&mdok, arguments, argName); // Value of interest
+    if (!mdok) {
+        value = psMetadataLookupStr(NULL, recipe, mdName);
+        if (!mdok) {
+            psError(PS_ERR_BAD_PARAMETER_VALUE, true, "Unable to find %s in recipe %s",
+                    mdName, PPSUB_RECIPE);
+            return false;
+        }
+    }
+    return psMetadataAddStr(target, PS_LIST_TAIL, mdName, 0, NULL, value);
+}
+
 // Get a vector from the command-line or recipe, and add it to the target
-static bool vectorArgRecipe(pmConfig *config,   // Configuration
-                            psMetadata *arguments, // Command-line arguments
+static bool vectorArgRecipe(psMetadata *arguments, // Command-line arguments
                             const char *argName, // Argument name in the command-line arguments
                             const psMetadata *recipe, // Recipe
@@ -176,9 +195,9 @@
     psMetadataAddStr(config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "Name of the output image", argv[3]);
 
-    valueArgStr(config, arguments, "-inmask",    "INPUT.MASK",    config->arguments);
-    valueArgStr(config, arguments, "-inweight",  "INPUT.WEIGHT",  config->arguments);
-    valueArgStr(config, arguments, "-refmask",   "REF.MASK",      config->arguments);
-    valueArgStr(config, arguments, "-refweight", "REF.WEIGHT",    config->arguments);
-    valueArgStr(config, arguments, "-stat",      "STATS",         config->arguments);
+    valueArgStr(arguments, "-inmask",    "INPUT.MASK",    config->arguments);
+    valueArgStr(arguments, "-inweight",  "INPUT.WEIGHT",  config->arguments);
+    valueArgStr(arguments, "-refmask",   "REF.MASK",      config->arguments);
+    valueArgStr(arguments, "-refweight", "REF.WEIGHT",    config->arguments);
+    valueArgStr(arguments, "-stat",      "STATS",         config->arguments);
 
     psMetadata *recipe = psMetadataLookupMetadata(NULL, config->recipes, PPSUB_RECIPE); // Recipe for ppSim
@@ -197,9 +216,10 @@
     VALUE_ARG_RECIPE_INT("-iter",         "ITER",            S32, 0);
     VALUE_ARG_RECIPE_FLOAT("-rej",        "REJ",             F32);
-    VALUE_ARG_RECIPE_INT("-mask-bad",     "MASK.BAD",        U8, 0);
-    VALUE_ARG_RECIPE_INT("-mask-blank",   "MASK.BLANK",      U8, 0);
-
-    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);
+
+    valueArgRecipeStr(arguments, recipe, "-mask-bad",   "MASK.BAD",   config->arguments);
+    valueArgRecipeStr(arguments, recipe, "-mask-blank", "MASK.BLANK", config->arguments);
+
+    vectorArgRecipe(arguments, "-isis-widths", recipe, "ISIS.WIDTHS", config->arguments, PS_TYPE_F32);
+    vectorArgRecipe(arguments, "-isis-orders", recipe, "ISIS.ORDERS", config->arguments, PS_TYPE_S32);
 
     psVector *widths = psMetadataLookupPtr(NULL, config->arguments, "ISIS.WIDTHS"); // ISIS Gaussian widths
