Index: trunk/psModules/src/imcombine/pmReadoutCombine.h
===================================================================
--- trunk/psModules/src/imcombine/pmReadoutCombine.h	(revision 6873)
+++ trunk/psModules/src/imcombine/pmReadoutCombine.h	(revision 7059)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-04-17 18:10:08 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-05-04 02:38:20 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -19,58 +19,32 @@
 #endif
 
-#include<stdio.h>
-#include<math.h>
-#include "pslib.h"
-#include "psConstants.h"
+#include <pslib.h>
 #include "pmFPA.h"
 
+// Combination parameters for pmReadoutCombine.  These values define how the combination is performed, and
+// should not vary by detector, so that it can be re-used for multiple combinations.
 typedef struct
 {
-    psStats *stats;
-    unsigned int maskVal;
-    float fracHigh;
-    float fracLow;
-    int nKeep;
+    psStatsOptions combine;             // Statistic to use when performing the combination
+    psMaskType maskVal;                 // Mask value
+    int nKeep;                          // Mimimum number of pixels to keep
+    float fracHigh;                     // Fraction of high pixels to immediately throw
+    float fracLow;                      // Fraction of low pixels to immediately throw
+    int iter;                           // Number of iterations for clipping (for CLIPPED_MEAN only)
+    float rej;                          // Rejection threshould for clipping (for CLIPPED_MEAN only)
 }
 pmCombineParams;
 
-pmCombineParams *pmCombineParamsAlloc (psStatsOptions statsOptions);
+// Allocator
+pmCombineParams *pmCombineParamsAlloc(psStatsOptions statsOptions // Statistic to use for combination
+                                     );
 
-psImage *pmReadoutCombine(psImage *output,
-                          const psArray *inputs,
-                          const psVector *zero,
-                          const psVector *scale,
-                          pmCombineParams *params,
-                          bool applyZeroScale,
-                          float gain,
-                          float readnoise);
-
-/**
- *
- * This function measures the robust median at each of the minimum and maximum
- * coordinates and determines the difference and mean of the two values. The size
- * of the box used to make the measurement at each point is specified by the
- * configuration variable FRINGE_SQUARE_RADIUS. From the collection of
- * differences, the robust median is calculated, and returned as part of the
- * fringe statistics. For each fringe point, the values of delta and midValue are
- * also assigned and available to the user on return.
- *
- */
-psStats *pmFringeStats(
-    psArray *fringePoints,
-    psImage *image,
-    psMetadata *config
-);
-
-typedef struct
-{
-    psF64 xMin;
-    psF64 yMin;
-    psF64 xMax;
-    psF64 yMax;
-    psF64 delta;
-    psF64 midValue;
-}
-pmFringePoint;
+// Combine multiple readouts, applying zero and scale, with optional minmax clipping
+bool pmReadoutCombine(pmReadout *output,// Output readout; altered and returned
+                      const psArray *inputs, // Array of input readouts (F32 image and weight, U8 mask)
+                      const psVector *zero, // Zero corrections to subtract from input, or NULL
+                      const psVector *scale, // Scale corrections to divide into input, or NULL
+                      pmCombineParams *params // Combination parameters
+                     );
 
 #endif
