Index: trunk/ppImage/src/ppImageDefineFile.c
===================================================================
--- trunk/ppImage/src/ppImageDefineFile.c	(revision 13531)
+++ trunk/ppImage/src/ppImageDefineFile.c	(revision 13562)
@@ -5,5 +5,5 @@
 # include "ppImage.h"
 
-bool ppImageDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType type) {
+bool ppImageDefineFile (pmConfig *config, pmFPA *input, char *filerule, char *argname, pmFPAfileType fileType, pmDetrendType detrendType) {
 
     bool status;
@@ -17,6 +17,6 @@
     }
     if (file) {
-	if (file->type != type) {
-	    psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (type));
+	if (file->type != fileType) {
+	    psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType));
 	    return false;
 	}
@@ -31,6 +31,6 @@
     }
     if (file) {
-	if (file->type != type) {
-	    psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (type));
+	if (file->type != fileType) {
+	    psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType));
 	    return false;
 	}
@@ -39,12 +39,12 @@
 
     // look for the file to be loaded from the detrend database
-    pmFPAfileDefineFromDetDB (&status, config, filerule, input, type);
+    file = pmFPAfileDefineFromDetDB (&status, config, filerule, input, detrendType);
     if (!status) {
-	psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
+	psError (PS_ERR_UNKNOWN, false, "failed to load file definition");
 	return false;
     }
     if (file) {
-	if (file->type != type) {
-	    psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (type));
+	if (file->type != fileType) {
+	    psError(PS_ERR_IO, true, "%s is not of type %s", filerule, pmFPAfileStringFromType (fileType));
 	    return false;
 	}
