Index: trunk/psphot/src/psphotLoadPSF.c
===================================================================
--- trunk/psphot/src/psphotLoadPSF.c	(revision 26894)
+++ trunk/psphot/src/psphotLoadPSF.c	(revision 29936)
@@ -6,5 +6,5 @@
 
 // XXX for now (2010.01.27), the supporting programs do not define multiple PSPHOT.PSF.LOAD
-// files to go with multiple PSPHOT.INPUT files.  as a result, the implementation below is
+// files to go with multiple input files.  as a result, the implementation below is
 // currently going to work for the case of a single input file, but will fail if we try with a
 // stack of images.
@@ -59,11 +59,8 @@
 }
 
-bool psphotLoadPSF (pmConfig *config, const pmFPAview *view) {
+// PSPHOT.PSF.LOAD vs input file -- see note at top
+bool psphotLoadPSF (pmConfig *config, const pmFPAview *view, const char *filerule) {
 
-    bool status = false;
-
-    // XXX PSPHOT.PSF.LOAD vs PSPHOT.INPUT -- see note at top
-    int num = psMetadataLookupS32 (&status, config->arguments, "PSPHOT.INPUT.NUM");
-    psAssert (status, "programming error: must define PSPHOT.INPUT.NUM");
+    int num = psphotFileruleCount(config, filerule);
 
     // loop over the available readouts
@@ -71,5 +68,5 @@
 
         // Generate the mask and weight images, including the user-defined analysis region of interest
-        if (!psphotLoadPSFReadout (config, view, "PSPHOT.INPUT", "PSPHOT.PSF.LOAD", i)) {
+        if (!psphotLoadPSFReadout (config, view, filerule, "PSPHOT.PSF.LOAD", i)) {
             psError (PSPHOT_ERR_CONFIG, false, "failed to load PSF model for PSPHOT.PSF.LOAD entry %d", i);
             return false;
