Index: trunk/ppMerge/src/ppMerge.h
===================================================================
--- trunk/ppMerge/src/ppMerge.h	(revision 5862)
+++ trunk/ppMerge/src/ppMerge.h	(revision 7061)
@@ -1,75 +1,9 @@
-# include <stdio.h>
-# include <strings.h>
-# include <glob.h>
+#ifndef PP_MERGE_H
+#define PP_MERGE_H
 
-# include "pslib.h"
+#include <stdio.h>
+#include <pslib.h>
+#include <psmodules.h>
 
-# include "psAdditionals.h"
+#define RECIPE "PPMERGE"                // Name of the recipe to use
 
-# include "pmAstrometry.h"
-# include "pmReadout.h"
-# include "pmConfig.h"
-# include "pmFPAConstruct.h"
-# include "pmFPARead.h"
-# include "pmFPAConceptsGet.h"
-# include "pmFPAWrite.h"
-
-# include "pmReadoutCombine.h"
-
-# define RECIPE "MERGE" // Name of the recipe to use
-
-// XXX : same as in ppImage
-typedef enum {
-    PP_LOAD_NONE,
-    PP_LOAD_FPA,
-    PP_LOAD_CHIP,
-    PP_LOAD_CELL,
-} ppImageLoadDepth;
-
-// XXX : same as in ppImage
-typedef struct {
-    psMetadata *site;
-    psMetadata *camera;
-    psMetadata *recipe;
-    psMetadata *arguments;
-    psDB       *database;
-} ppConfig;
-
-typedef struct {
-    char *filename;
-    pmFPA *fpa;
-    psFits *fits;
-    psMetadata *header;
-    double zero;
-    double scale;
-} ppFPA; 
-
-typedef struct {
-    psArray *input;
-    ppFPA *output;
-    ppFPA *process;
-    ppFPA *mask;
-} ppData;
-
-typedef struct {
-    ppImageLoadDepth imageLoadDepth;
-    bool doMask;			// apply a pixel mask before stacking
-    pmCombineParams *combineParams;
-    bool applyZeroScale;
-    double gain;
-    double readnoise;
-} ppOptions;
-
-bool ppMergeConfig (ppConfig *config, int argc, char **argv);
-bool ppMergeLoop (ppData *data, ppOptions *options, ppConfig *config);
-bool ppMergeOptions (ppData *data, ppOptions *options, ppConfig *config);
-bool ppMergeOutput (ppData *data, ppOptions *options, ppConfig *config);
-bool ppMergeParseCamera (ppData *data, ppConfig *config);
-bool ppMergeParseDetrend (ppData *data, ppOptions *options, ppConfig *config);
-
-bool ppMergeCell (pmCell *output, pmCell *mask, psArray *cellList, ppOptions *options, ppConfig *config);
-
-// XXX : these functions are identical to the ppImage equivalents
-pmReadout* ppDetrendSelectFirst (pmCell *cell, char *name, bool doThis);
-bool ppFPAOpen (ppFPA *fpa, psMetadata *camera, char *name, bool doThis);
-bool ppMergeLoadPixels (ppFPA *input, ppFPA *process, psDB *db, int nChip, int nCell);
