Index: /trunk/psastro/src/psastroArguments.c
===================================================================
--- /trunk/psastro/src/psastroArguments.c	(revision 6910)
+++ /trunk/psastro/src/psastroArguments.c	(revision 6911)
@@ -34,4 +34,12 @@
     // 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
+    if ((N = psArgumentGet (*argc, argv, "-chip"))) {
+	psArgumentRemove (N, argc, argv);
+	psMetadataAddStr (config->arguments, PS_LIST_TAIL, "CHIP_SELECTION", PS_DATA_STRING, "", psStringCopy(argv[N]));
+	psArgumentRemove (N, argc, argv);
+    }
 
     status = pmConfigFileSetsMD (config->arguments, "INPUT", "-file", "-list");
@@ -43,5 +51,5 @@
     psMetadataAddStr (config->arguments, PS_LIST_TAIL, "OUTPUT", 0, "", argv[2]);
 
-    psTrace(__func__, 1, "Done with psphotArguments...\n");
+    psTrace(__func__, 1, "Done with psastroArguments...\n");
     return (config);
 }
Index: /trunk/psastro/src/psastroDataLoop.c
===================================================================
--- /trunk/psastro/src/psastroDataLoop.c	(revision 6910)
+++ /trunk/psastro/src/psastroDataLoop.c	(revision 6911)
@@ -1,8 +1,8 @@
 # include "psastro.h"
 
-// load the data from the files in this loop.
-// we write out the result in a second loop
+// this loop just loads the data from the input files.
 // at the end of this function, the complete stellar data is loaded
 // into the correct fpa structure locations (readout.analysis:PSPHOT.SOURCES)
+// all of the different astrometry analysis modes use the same data load loop
 bool psastroDataLoop (pmConfig *config) {
 
@@ -12,4 +12,7 @@
 	exit(EXIT_FAILURE);
     }
+    // de-activate all files except PSASTRO.INPUT
+    psFPAfileActivate (config->files, false, NULL);
+    psFPAfileActivate (config->files, true, "PSASTRO.INPUT");
 
     pmFPAview *view = pmFPAviewAlloc (0);
@@ -42,2 +45,5 @@
     return true;
 }
+
+// we need to suppress other IO files.  we need a function with toggles the mode/state of the
+// pmFPAfiles so the ones of interest are active.
Index: /trunk/psastro/src/psastroParseCamera.c
===================================================================
--- /trunk/psastro/src/psastroParseCamera.c	(revision 6910)
+++ /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;
