Index: trunk/psastro/src/psastroParseCamera.c
===================================================================
--- trunk/psastro/src/psastroParseCamera.c	(revision 6911)
+++ trunk/psastro/src/psastroParseCamera.c	(revision 7014)
@@ -1,10 +1,11 @@
-# include "psphot.h"
+# include "psastro.h"
+// XXX leak free 2006.04.27
 
-bool *psastroParseCamera (pmConfig *config) {
+bool psastroParseCamera (pmConfig *config) {
 
-    ppFile *input = ppFileAlloc ();
+    bool status = false;
 
     // the input image(s) are required arguments; they define the camera
-    input = pmFPAfileAddSource (config, "INPUT", "PSASTRO.INPUT", true);
+    pmFPAfile *input = pmFPAfileFromArgs (&status, config, "PSASTRO.INPUT", "INPUT");
     if (!status) { psAbort (__func__, "missing INPUT entry"); }
 
@@ -15,6 +16,6 @@
 
     // set default recipe values here
-    psMetadataAddStr (recipe, PS_LIST_TAIL, "PHOTCODE", PS_META_NO_REPLACE, "default fitting mode", "NONE");
-    psMetadataAddStr (recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_NO_REPLACE, "default fitting mode", "NONE");
+    psMetadataAddStr (recipe, PS_LIST_TAIL, "PHOTCODE",    PS_META_NO_REPLACE, "", "NONE");
+    psMetadataAddStr (recipe, PS_LIST_TAIL, "BREAK_POINT", PS_META_NO_REPLACE, "", "NONE");
 
     // these calls bind the I/O handle to the specified fpa
@@ -38,6 +39,22 @@
         }
     }
+    psFree (chips);
 
     psTrace(__func__, 1, "Done with psastroParseCamera...\n");
     return true;
 }
+
+
+// useful for debugging
+# if 0
+for (int i = 0; i < input->fpa->chips->n; i++) {
+    pmChip *chip = input->fpa->chips->data[i];
+    fprintf (stderr, "chip %2d: %x %x\n", i, chip->file_exists, chip->process);
+
+    for (int j = 0; j < chip->cells->n; j++) {
+	pmCell *cell = chip->cells->data[j];
+	fprintf (stderr, "cell %2d: %x %x\n", j, cell->file_exists, cell->process);
+
+    }
+}
+# endif
