Index: trunk/psphot/src/psphotGuessModels.c
===================================================================
--- trunk/psphot/src/psphotGuessModels.c	(revision 27657)
+++ trunk/psphot/src/psphotGuessModels.c	(revision 28013)
@@ -8,5 +8,5 @@
 
 // for now, let's store the detections on the readout->analysis for each readout
-bool psphotGuessModels (pmConfig *config, const pmFPAview *view)
+bool psphotGuessModels (pmConfig *config, const pmFPAview *view, const char *filerule)
 {
     bool status = true;
@@ -22,6 +22,6 @@
     for (int i = 0; i < num; i++) {
 	if (i == chisqNum) continue; // skip chisq image
-        if (!psphotGuessModelsReadout (config, view, "PSPHOT.INPUT", i)) {
-            psError (PSPHOT_ERR_CONFIG, false, "failed on to guess models for PSPHOT.INPUT entry %d", i);
+        if (!psphotGuessModelsReadout (config, view, filerule, i)) {
+            psError (PSPHOT_ERR_CONFIG, false, "failed on to guess models for %s entry %d", filerule, i);
             return false;
         }
@@ -31,5 +31,5 @@
 
 // construct an initial PSF model for each object (new sources only)
-bool psphotGuessModelsReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index) {
+bool psphotGuessModelsReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index) {
 
     bool status;
@@ -38,5 +38,5 @@
 
     // find the currently selected readout
-    pmFPAfile *file = pmFPAfileSelectSingle(config->files, filename, index); // File of interest
+    pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, index); // File of interest
     psAssert (file, "missing file?");
 
