Index: trunk/psastro/src/psastroParseCamera.c
===================================================================
--- trunk/psastro/src/psastroParseCamera.c	(revision 6792)
+++ trunk/psastro/src/psastroParseCamera.c	(revision 6911)
@@ -7,7 +7,10 @@
     // the input image(s) are required arguments; they define the camera
     input = pmFPAfileAddSource (config, "INPUT", "PSASTRO.INPUT", true);
-    if (input == NULL) {
-	psAbort (__func__, "missing INPUT entry");
-    }
+    if (!status) { psAbort (__func__, "missing INPUT entry"); }
+
+    // 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);
 
     // set default recipe values here
@@ -15,4 +18,25 @@
     psMetadataAddStr (recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_NO_REPLACE, "default fitting mode", "NONE");
 
+    // these calls bind the I/O handle to the specified fpa
+    pmFPAfileDefine (config->files, config->camera, input->fpa, "PSASTRO.OUTPUT");
+
+    // supply the output name (from cmd-line) to all output (WRITE) files
+    char *output = psMetadataLookupPtr(&status, config->arguments, "OUTPUT");
+    pmFPAfileAddFileNames (config->files, "OUTPUT", output, PM_FPA_MODE_WRITE);
+
+    // Chip selection: turn on only the chips specified
+    char *chipLine = psMetadataLookupStr(NULL, config->arguments, "CHIP_SELECTIONS"); 
+    psArray *chips = psStringSplitArray (chipLine, ",");
+    if (chips->n > 0) {
+	pmFPASelectChip (input->fpa, -1, true); // deselect all chips
+	for (int i = 0; i < chips->n; i++) {
+	    int chipNum = atoi(chips->data[i]);
+	    if (! pmFPASelectChip(input->fpa, chipNum, false)) {
+		psErrorStackPrint(stderr, "Chip number %d doesn't exist in camera.\n", chipNum);
+		exit(EXIT_FAILURE);
+	    }
+        }
+    }
+
     psTrace(__func__, 1, "Done with psastroParseCamera...\n");
     return true;
