Index: trunk/psastro/src/psastroArguments.c
===================================================================
--- trunk/psastro/src/psastroArguments.c	(revision 9627)
+++ 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");
