Index: branches/ipp-2-2/psModules/src/detrend/pmBias.h
===================================================================
--- branches/ipp-2-2/psModules/src/detrend/pmBias.h	(revision 14385)
+++ branches/ipp-2-2/psModules/src/detrend/pmBias.h	(revision 14504)
@@ -5,53 +5,14 @@
  * @author Paul Price, IfA
  *
- * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-06-20 20:45:00 $
+ * @version $Revision: 1.6.2.1 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-08-15 20:10:01 $
  * Copyright 2004--2006 Institute for Astronomy, University of Hawaii
  */
 
-#ifndef PM__BIAS_H
-#define PM__BIAS_H
+#ifndef PM_BIAS_H
+#define PM_BIAS_H
 
 /// @addtogroup detrend Detrend Creation and Application
 /// @{
-
-/// Type of fit to perform
-typedef enum {
-    PM_FIT_NONE,                        ///< No fit
-    PM_FIT_POLY_ORD,                    ///< Fit ordinary polynomial
-    PM_FIT_POLY_CHEBY,                  ///< Fit Chebyshev polynomial
-    PM_FIT_SPLINE                       ///< Fit cubic splines
-} pmFit;
-
-/// Options for overscan subtraction
-///
-/// The overscan subtraction may be performed by reducing all overscan regions to a single value (e.g., if
-/// there is no structure); or the overscan may be fit perpendicular to the read direction (usually the
-/// columns) with a particular functional form; or a single value may be subtracted for each read/scan without
-/// fitting (if the structure defies characterisation).  In any case, statistics are required to reduce
-/// multiple values to a single value (either for the scan, or for the entire overscan regions).
-typedef struct
-{
-    // Inputs
-    bool single;                        ///< Reduce all overscan regions to a single value?
-    pmFit fitType;                      ///< Type of fit to overscan
-    unsigned int order;                 ///< Order of polynomial, or number of spline pieces
-    psStats *stat;                      ///< Statistic to use when reducing the minor direction
-    int boxcar;                         ///< Boxcar smoothing radius
-    float gauss;                        ///< Gaussian smoothing sigma
-    // Outputs
-    psPolynomial1D *poly;               ///< Result of polynomial fit
-    psSpline1D *spline;                 ///< Result of spline fit
-}
-pmOverscanOptions;
-
-/// Allocator for overscan options
-pmOverscanOptions *pmOverscanOptionsAlloc(bool single, ///< Reduce all overscan regions to a single value?
-                                          pmFit fitType, ///< Type of fit to overscan
-                                          unsigned int order, ///< Order of polynomial, or number of splines
-                                          psStats *stat, ///< Statistic to use
-                                          int boxcar, ///< Boxcar smoothing radius
-                                          float gauss ///< Gaussian smoothing sigma
-                                         );
 
 /// Subtract the overscan, bias and/or dark
@@ -66,4 +27,11 @@
                    );
 
+// pmBiasSubtractFrame(): this routine will take as input a readout for the input image and a readout for the bias
+// image.  The bias image is subtracted in place from the input image.
+bool pmBiasSubtractFrame(pmReadout *in, // Input readout
+                          const pmReadout *sub, // Readout to be subtracted from input
+                          float scale   // Scale to apply before subtracting
+    );
+
 /// @}
 #endif
