Index: trunk/psphot/src/psphotMaskReadout.c
===================================================================
--- trunk/psphot/src/psphotMaskReadout.c	(revision 26894)
+++ trunk/psphot/src/psphotMaskReadout.c	(revision 28013)
@@ -1,5 +1,5 @@
 # include "psphotInternal.h"
 
-bool psphotSetMaskAndVariance (pmConfig *config, const pmFPAview *view) {
+bool psphotSetMaskAndVariance (pmConfig *config, const pmFPAview *view, const char *filerule) {
 
     bool status = false;
@@ -16,5 +16,5 @@
 
 	// Generate the mask and weight images, including the user-defined analysis region of interest
-	if (!psphotSetMaskAndVarianceReadout (config, view, "PSPHOT.INPUT", i, recipe)) {
+	if (!psphotSetMaskAndVarianceReadout (config, view, filerule, i, recipe)) {
             psError (PSPHOT_ERR_CONFIG, false, "failed to generate mask for PSPHOT.INPUT entry %d", i);
 	    return false;
@@ -25,9 +25,9 @@
 
 // generate mask and variance if not defined, additional mask for restricted subregion
-bool psphotSetMaskAndVarianceReadout (pmConfig *config, const pmFPAview *view, const char *filename, int index, psMetadata *recipe) {
+bool psphotSetMaskAndVarianceReadout (pmConfig *config, const pmFPAview *view, const char *filerule, int index, psMetadata *recipe) {
 
     bool status;
 
-    pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PSPHOT.INPUT", index); // File of interest
+    pmFPAfile *file = pmFPAfileSelectSingle(config->files, filerule, index); // File of interest
     psAssert (file, "missing file?");
 
