Index: /trunk/ppImage/src/ppFocusArguments.c
===================================================================
--- /trunk/ppImage/src/ppFocusArguments.c	(revision 10438)
+++ /trunk/ppImage/src/ppFocusArguments.c	(revision 10439)
@@ -18,5 +18,5 @@
 
     // load the site-wide configuration information
-    pmConfig *config = pmConfigRead(&argc, argv);
+    pmConfig *config = pmConfigRead(&argc, argv, RECIPE_NAME);
     if (config == NULL) {
         psErrorStackPrint(stderr, "Can't find site configuration!\n");
@@ -24,7 +24,11 @@
     }
 
+    // save the following additional recipe values based on command-line options
+    // these options override the PPIMAGE recipe values loaded from recipe files
+    psMetadata *options = pmConfigRecipeOptions (config, RECIPE_NAME);
+
     // save these recipe options until we have loaded the options
-    psMetadata *options = psMetadataAlloc ();
-    psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PPIMAGE.OPTIONS",  PS_DATA_METADATA, "", options);
+    // psMetadata *options = psMetadataAlloc ();
+    // psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PPIMAGE.OPTIONS",  PS_DATA_METADATA, "", options);
 
     // the following options override the PPIMAGE recipe options
Index: /trunk/ppImage/src/ppFocusParseCamera.c
===================================================================
--- /trunk/ppImage/src/ppFocusParseCamera.c	(revision 10438)
+++ /trunk/ppImage/src/ppFocusParseCamera.c	(revision 10439)
@@ -17,9 +17,4 @@
         return NULL;
     }
-
-    // add recipe options supplied on command line
-    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, RECIPE_NAME);
-    psMetadata *arglist = psMetadataLookupPtr (&status, config->arguments, "PPIMAGE.OPTIONS");
-    psMetadataCopy (recipe, arglist);
 
     // parse the options from the metadata format to the ppImageOptions structure
Index: /trunk/ppImage/src/ppImageArguments.c
===================================================================
--- /trunk/ppImage/src/ppImageArguments.c	(revision 10438)
+++ /trunk/ppImage/src/ppImageArguments.c	(revision 10439)
@@ -34,5 +34,5 @@
 
     // load the site-wide configuration information
-    pmConfig *config = pmConfigRead(&argc, argv);
+    pmConfig *config = pmConfigRead(&argc, argv, RECIPE_NAME);
     if (config == NULL) {
         psErrorStackPrint(stderr, "Can't find site configuration!\n");
@@ -40,7 +40,11 @@
     }
 
+    // save the following additional recipe values based on command-line options
+    // these options override the PPIMAGE recipe values loaded from recipe files
+    psMetadata *options = pmConfigRecipeOptions (config, RECIPE_NAME);
+
     // save these recipe options until we have loaded the options
-    psMetadata *options = psMetadataAlloc ();
-    psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PPIMAGE.OPTIONS",  PS_DATA_METADATA, "", options);
+    // psMetadata *options = psMetadataAlloc ();
+    // psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PPIMAGE.OPTIONS",  PS_DATA_METADATA, "", options);
 
     if ((argnum = psArgumentGet(argc, argv, "-stat"))) {
Index: /trunk/ppImage/src/ppImageAstrom.c
===================================================================
--- /trunk/ppImage/src/ppImageAstrom.c	(revision 10438)
+++ /trunk/ppImage/src/ppImageAstrom.c	(revision 10439)
@@ -11,5 +11,5 @@
     // select recipe options supplied on command line
     // XXX move these options to the "PSASTRO" recipe?
-    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, RECIPE_NAME);
+    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSASTRO_RECIPE);
 
     // find or define a pmFPAfile PSPHOT.INPUT
Index: /trunk/ppImage/src/ppImageLoop.c
===================================================================
--- /trunk/ppImage/src/ppImageLoop.c	(revision 10438)
+++ /trunk/ppImage/src/ppImageLoop.c	(revision 10439)
@@ -17,7 +17,6 @@
 
     bool mdok;                      // Status of MD lookup
-    psMetadata *extraOpts = psMetadataLookupMetadata(&mdok, config->arguments,
-                                                     "PPIMAGE.OPTIONS"); // Extra options
-    const char *statsName = psMetadataLookupStr(&mdok, extraOpts, "STATS"); // Filename for statistics
+    psMetadata *recipe = psMetadataLookupMetadata(&mdok, config->recipes, RECIPE_NAME);
+    const char *statsName = psMetadataLookupStr(&mdok, recipe, "STATS"); // Filename for statistics
     psMetadata *stats = NULL;           // Container for statistics
     FILE *statsFile = NULL;             // File stream for statistics
Index: /trunk/ppImage/src/ppImageParseCamera.c
===================================================================
--- /trunk/ppImage/src/ppImageParseCamera.c	(revision 10438)
+++ /trunk/ppImage/src/ppImageParseCamera.c	(revision 10439)
@@ -35,6 +35,4 @@
     // add recipe options supplied on command line
     psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, RECIPE_NAME);
-    psMetadata *arglist = psMetadataLookupPtr (&status, config->arguments, "PPIMAGE.OPTIONS");
-    psMetadataCopy (recipe, arglist);
 
     // parse the options from the metadata format to the ppImageOptions structure
Index: /trunk/ppImage/src/ppImagePhotom.c
===================================================================
--- /trunk/ppImage/src/ppImagePhotom.c	(revision 10438)
+++ /trunk/ppImage/src/ppImagePhotom.c	(revision 10439)
@@ -14,5 +14,5 @@
 
     // select recipe options supplied on command line
-    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, "PSPHOT");
+    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSPHOT_RECIPE);
 
     // set default recipe values here
Index: /trunk/ppImage/src/ppTest.c
===================================================================
--- /trunk/ppImage/src/ppTest.c	(revision 10438)
+++ /trunk/ppImage/src/ppTest.c	(revision 10439)
@@ -17,5 +17,5 @@
 // ppImageConfig.c
 //////////////////////////////////////////////////////////////////////////////////////////////////////////////
-    pmConfig *config = pmConfigRead(&argc, argv);
+    pmConfig *config = pmConfigRead(&argc, argv, "PPIMAGE");
     if (! config) {
         psErrorStackPrint(stderr, "Can't find site configuration!\n");
@@ -73,5 +73,5 @@
     }
     // Determine the correct recipe to use
-    if (! config->recipes && !pmConfigReadRecipes(config)) {
+    if (! config->recipes && !pmConfigReadRecipes(config, PM_RECIPE_SOURCE_CAMERA | PM_RECIPE_SOURCE_CL)) {
         // There's no point in continuing if we can't work out what recipes to use
         psErrorStackPrint(stderr, "Can't find recipe configuration!\n");
