Index: trunk/ppImage/src/ppImage.h
===================================================================
--- trunk/ppImage/src/ppImage.h	(revision 6747)
+++ trunk/ppImage/src/ppImage.h	(revision 6817)
@@ -2,9 +2,9 @@
 #define PP_IMAGE_H
 
+#include <stdio.h>
 #include "pslib.h"
 #include "psmodules.h"
-
-#include "ppImageData.h"
 #include "ppImageOptions.h"
+#include "ppMem.h"
 
 #define RECIPE_NAME "PHASE2"            // Name of the recipe to use
@@ -15,30 +15,18 @@
 
 // Determine what type of camera, and initialise
-bool ppImageParseCamera(ppImageData *data,   // The data to be processed
-                        pmConfig *config // Configuration
-                        );
-
+bool ppImageParseDetrend(ppImageOptions *options, pmConfig *config);
 
 // Loop over the input
-bool ppImageLoop(ppImageData *data, ppImageOptions *options, pmConfig *config);
+bool ppImageLoop(ppImageOptions *options, pmConfig *config);
 
-// Load the pixels for the given file
-bool ppImageLoadPixels(ppFile *input,   // File for which to load the pixels
-                       psDB *db,        // Database handle (for reading concepts)
-                       int nChip,       // Chip number to load
-                       int nCell        // Cell number to load
-                       );
+// perform the detrend analysis on the current readout
+bool ppImageDetrendReadout (ppImageOptions *options, pmConfig *config, pmFPAview *view);
 
-bool ppImageParseDetrend(ppImageData *data, ppImageOptions *options, pmConfig *config);
+bool ppImageDetrendBias(pmReadout *inputReadout, pmReadout *bias, pmReadout *dark, ppImageOptions *options);
+bool ppImageDetrendMask(pmReadout *input, pmReadout *mask);
 
-bool ppReadoutWeights(pmReadout *readout);
-
-#if 0
-// These functions are not implemented, or not needed
-pmReadout* ppDetrendPedestal(pmReadout *pedestal, pmCell *input, pmReadout *bias, pmReadout *dark, float darkTime, ppImageOptions *options);
-bool ppImageOutput(ppImageData *data, pmConfig *config);
-bool ppImagePhot(ppImageData *data, ppImageOptions *options, pmConfig *config);
-bool ppFileOpen(ppFile *fpa, char *name, bool doThis);
-#endif
+bool ppImageDetrendNonLinear(pmReadout *input, ppImageOptions *options);
+bool ppImageDetrendNonLinearLookup(pmReadout *input, psMetadataItem *dataItem);
+bool ppImageDetrendNonLinearPolynomial(pmReadout *input, psMetadataItem *dataItem);
 
 #endif // Pau.
