Index: /trunk/psastro/src/psastro.h
===================================================================
--- /trunk/psastro/src/psastro.h	(revision 10437)
+++ /trunk/psastro/src/psastro.h	(revision 10438)
@@ -11,4 +11,5 @@
 
 # include "psastroErrorCodes.h"
+#define PSASTRO_RECIPE "PSASTRO" // Name of the recipe to use
 
 # define psMemCopy(A)(psMemIncrRefCounter((A)))
Index: /trunk/psastro/src/psastroArguments.c
===================================================================
--- /trunk/psastro/src/psastroArguments.c	(revision 10437)
+++ /trunk/psastro/src/psastroArguments.c	(revision 10438)
@@ -15,6 +15,14 @@
     psLogSetFormat ("M");
 
-    // these other options override the PSASTRO recipe options
-    psMetadata *options = psMetadataAlloc ();
+    // load config data from default locations
+    pmConfig *config = pmConfigRead(&argc, argv, PSASTRO_RECIPE);
+    if (config == NULL) {
+        psError(PSASTRO_ERR_CONFIG, false, "Can't read site configuration");
+        return NULL;
+    }
+
+    // save the following additional recipe values based on command-line options
+    // these options override the PSPHOT recipe values loaded from recipe files
+    psMetadata *options = pmConfigRecipeOptions (config, PSASTRO_RECIPE);
 
     // photcode : used in output to supplement header data (argument or recipe?)
@@ -24,15 +32,4 @@
         psArgumentRemove (N, &argc, argv);
     }
-
-    // load config data from default locations
-    pmConfig *config = pmConfigRead(&argc, argv);
-    if (config == NULL) {
-        psError(PSASTRO_ERR_CONFIG, false, "Can't read site configuration");
-        return NULL;
-    }
-
-    // save these recipe options until we have loaded the options
-    psMetadataAddPtr (config->arguments, PS_LIST_TAIL, "PSASTRO.OPTIONS",  PS_DATA_METADATA, "", options);
-    psFree (options);
 
     // chip selection is used to limit chips to be processed
@@ -49,4 +46,7 @@
         psArgumentRemove (N, &argc, argv);
     }
+
+    // drop the local view on the options (saved in config->arguments)
+    psFree (options);
 
     status = pmConfigFileSetsMD (config->arguments, config, "INPUT", "-file", "-list");
Index: /trunk/psastro/src/psastroAstromGuess.c
===================================================================
--- /trunk/psastro/src/psastroAstromGuess.c	(revision 10437)
+++ /trunk/psastro/src/psastroAstromGuess.c	(revision 10438)
@@ -28,5 +28,5 @@
 
     // select the current recipe
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");
+    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
     if (!recipe) {
 	psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!");
Index: /trunk/psastro/src/psastroChipAstrom.c
===================================================================
--- /trunk/psastro/src/psastroChipAstrom.c	(revision 10437)
+++ /trunk/psastro/src/psastroChipAstrom.c	(revision 10438)
@@ -9,5 +9,5 @@
 
     // select the current recipe
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");
+    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
     if (!recipe) {
 	psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe");
Index: /trunk/psastro/src/psastroChooseRefstars.c
===================================================================
--- /trunk/psastro/src/psastroChooseRefstars.c	(revision 10437)
+++ /trunk/psastro/src/psastroChooseRefstars.c	(revision 10438)
@@ -9,5 +9,5 @@
 
     // select the current recipe
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");
+    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
     if (!recipe) {
         psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n");
Index: /trunk/psastro/src/psastroDataLoad.c
===================================================================
--- /trunk/psastro/src/psastroDataLoad.c	(revision 10437)
+++ /trunk/psastro/src/psastroDataLoad.c	(revision 10438)
@@ -13,5 +13,5 @@
 
     // select the current recipe
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");
+    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
     if (!recipe) {
 	psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n");
Index: /trunk/psastro/src/psastroDataSave.c
===================================================================
--- /trunk/psastro/src/psastroDataSave.c	(revision 10437)
+++ /trunk/psastro/src/psastroDataSave.c	(revision 10438)
@@ -10,5 +10,5 @@
 
     // select the current recipe
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");
+    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
     if (!recipe) {
 	psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n");
Index: /trunk/psastro/src/psastroLoadRefstars.c
===================================================================
--- /trunk/psastro/src/psastroLoadRefstars.c	(revision 10437)
+++ /trunk/psastro/src/psastroLoadRefstars.c	(revision 10438)
@@ -13,5 +13,5 @@
 
     // select the current recipe
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");
+    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
 
     // DVO APIs expect decimal degrees
Index: /trunk/psastro/src/psastroMosaicAstrom.c
===================================================================
--- /trunk/psastro/src/psastroMosaicAstrom.c	(revision 10437)
+++ /trunk/psastro/src/psastroMosaicAstrom.c	(revision 10438)
@@ -7,5 +7,5 @@
 
     // select the current recipe
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");
+    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
     if (!recipe) {
 	psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n");
Index: /trunk/psastro/src/psastroMosaicHeaders.c
===================================================================
--- /trunk/psastro/src/psastroMosaicHeaders.c	(revision 10437)
+++ /trunk/psastro/src/psastroMosaicHeaders.c	(revision 10438)
@@ -7,5 +7,5 @@
 
     // select the current recipe
-    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, "PSASTRO");
+    psMetadata *recipe  = psMetadataLookupPtr (NULL, config->recipes, PSASTRO_RECIPE);
     if (!recipe) {
  	psError(PSASTRO_ERR_CONFIG, true, "Can't find PSASTRO recipe!\n");
Index: /trunk/psastro/src/psastroParseCamera.c
===================================================================
--- /trunk/psastro/src/psastroParseCamera.c	(revision 10437)
+++ /trunk/psastro/src/psastroParseCamera.c	(revision 10438)
@@ -13,7 +13,5 @@
 
     // select recipe options supplied on command line
-    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes,   "PSASTRO");
-    psMetadata *options = psMetadataLookupPtr (&status, config->arguments, "PSASTRO.OPTIONS");
-    psMetadataCopy (recipe, options);
+    psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, PSASTRO_RECIPE);
 
     // set default recipe values here
