Index: branches/eam_branches/psphot.stack.20100120/src/psphotDeblendSatstars.c
===================================================================
--- branches/eam_branches/psphot.stack.20100120/src/psphotDeblendSatstars.c	(revision 26688)
+++ branches/eam_branches/psphot.stack.20100120/src/psphotDeblendSatstars.c	(revision 26691)
@@ -6,5 +6,5 @@
     bool status = true;
 
-    int num = psMetadataAddS32 (&status, config->arguments, "PSPHOT.INPUT.NUM");
+    int num = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.INPUT.NUM");
     psAssert (status, "programming error: must define PSPHOT.INPUT.NUM");
 
@@ -19,8 +19,9 @@
 }
 
-bool psphotDeblendSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index) {
+bool psphotDeblendSatstarsReadout (pmConfig *config, const pmFPAview *view, const char *filename, int fileIndex) {
 
     int N;
     pmSource *source;
+    bool status;
 
     psTimerStart ("psphot.deblend.sat");
@@ -30,5 +31,5 @@
 
     // find the currently selected readout
-    pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest
+    pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, fileIndex); // File of interest
     psAssert (file, "missing file?");
 
@@ -51,5 +52,4 @@
     psAssert (recipe, "missing recipe?");
 
-    bool status;
     pmCell *cell = readout->parent;
     float SATURATION = 0.75*psMetadataLookupF32 (&status, cell->concepts, "CELL.SATURATION");
