Index: trunk/psphot/src/psphotSubtractBackground.c
===================================================================
--- trunk/psphot/src/psphotSubtractBackground.c	(revision 27657)
+++ trunk/psphot/src/psphotSubtractBackground.c	(revision 28013)
@@ -4,5 +4,5 @@
 // generate the median in NxN boxes, clipping heavily
 // linear interpolation to generate full-scale model
-bool psphotSubtractBackgroundReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe)
+bool psphotSubtractBackgroundReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe)
 {
     bool status = true;
@@ -13,5 +13,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
 
     pmFPA *inFPA = file->fpa;
@@ -124,5 +124,5 @@
 }
 
-bool psphotSubtractBackground (pmConfig *config, const pmFPAview *view)
+bool psphotSubtractBackground (pmConfig *config, const pmFPAview *view, const char *filerule)
 {
     bool status = false;
@@ -137,5 +137,5 @@
     // loop over the available readouts
     for (int i = 0; i < num; i++) {
-	if (!psphotSubtractBackgroundReadout (config, view, "PSPHOT.INPUT", i, recipe)) {
+	if (!psphotSubtractBackgroundReadout (config, view, filerule, i, recipe)) {
             psError (PSPHOT_ERR_CONFIG, false, "failed to subtract background for PSPHOT.INPUT entry %d", i);
 	    return false;
