Index: trunk/ppImage/src/ppImagePhotom.c
===================================================================
--- trunk/ppImage/src/ppImagePhotom.c	(revision 28375)
+++ trunk/ppImage/src/ppImagePhotom.c	(revision 29926)
@@ -11,7 +11,7 @@
     pmCell *cell;
     pmReadout *readout;
-    printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast()));
+
     psphotInit();
-    printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast()));
+
     // find or define a pmFPAfile PSPHOT.INPUT
     pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PSPHOT.INPUT");
@@ -20,10 +20,10 @@
         return false;
     }
-    printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast()));
+
     // we make a new copy of the output chip to keep psphot from modifying the output image
     pmChip *oldChip = pmFPAviewThisChip (view, input->src);
     pmChip *newChip = pmFPAviewThisChip (view, input->fpa);
     pmChipCopy (newChip, oldChip);
-    printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast()));
+
     // iterate over the cells and readout for this chip
     while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
@@ -34,7 +34,7 @@
         while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
             if (! readout->data_exists) { continue; }
-	    printf("%x %s\n",psErrorCodeLast(),psErrorCodeString(psErrorCodeLast()));
+
             // run the actual photometry analysis
-            if (!psphotReadout (config, view)) {
+            if (!psphotReadout (config, view, "PSPHOT.INPUT")) {
                 // This is likely a data quality issue
                 // XXX Split into multiple cases using error codes?
@@ -60,10 +60,4 @@
     ppImageMemoryDump("photom");
 
-    // the PSPHOT.INPUT file is a temporary file used to carry PPIMAGE.CHIP to psphotReadout
-    // XXX not sure that this is needed...
-//    pmFPAfileActivate (config->files, false, "PSPHOT.INPUT");
-
     return true;
 }
-
-// XXX do we need to deactivate all files and activate the psphot ones explicitly?
