Index: trunk/psModules/src/astrom/pmAstrometry.c
===================================================================
--- trunk/psModules/src/astrom/pmAstrometry.c	(revision 5356)
+++ trunk/psModules/src/astrom/pmAstrometry.c	(revision 5435)
@@ -8,6 +8,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-09-28 20:43:52 $
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-10-20 23:06:24 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -71,6 +71,6 @@
         }
         psFree(fpa->chips);
-        psFree(fpa->header);
-        psFree(fpa->db);
+        psFree(fpa->private);
+        psFree(fpa->phu);
     }
 }
@@ -93,7 +93,5 @@
         psFree(chip->cells);
         psFree(chip->parent);
-        psFree(chip->extname);
-        psFree(chip->pixels);
-        psFree(chip->header);
+        psFree(chip->private);
     }
 }
@@ -106,4 +104,5 @@
         psFree(cell->toSky);
         psFree(cell->concepts);
+        psFree(cell->camera);
         psFree(cell->analysis);
         //
@@ -117,7 +116,5 @@
         psFree(cell->readouts);
         psFree(cell->parent);
-        psFree(cell->extname);
-        psFree(cell->pixels);
-        psFree(cell->header);
+        psFree(cell->private);
     }
 }
@@ -128,6 +125,7 @@
         psFree(readout->image);
         psFree(readout->mask);
+        psFree(readout->weight);
+        psFree(readout->bias);
         psFree(readout->analysis);
-        psFree(readout->concepts);
         psFree(readout->parent);
     }
@@ -145,6 +143,7 @@
     tmpReadout->image = NULL;
     tmpReadout->mask = NULL;
+    tmpReadout->weight = NULL;
+    tmpReadout->bias = NULL;
     tmpReadout->analysis = psMetadataAlloc();
-    tmpReadout->concepts = psMetadataAlloc();
     tmpReadout->parent = cell;
     if (cell != NULL) {
@@ -155,5 +154,9 @@
 }
 
-pmCell *pmCellAlloc(pmChip *chip)
+pmCell *pmCellAlloc(
+    pmChip *chip,
+    psMetadata *cameradata,
+    psString name
+)
 {
     pmCell *tmpCell = (pmCell *) psAlloc(sizeof(pmCell));
@@ -164,6 +167,12 @@
     tmpCell->toFPA = NULL;
     tmpCell->toSky = NULL;
-    tmpCell->analysis = psMetadataAlloc();
     tmpCell->concepts = psMetadataAlloc();
+    psBool rc = psMetadataAddStr(tmpCell->concepts, PS_LIST_HEAD, "CELL.NAME", 0, NULL, name);
+    if (rc == false) {
+        psLogMsg(__func__, PS_LOG_WARN, "WARNING: Could not add CELL.NAME to metadata.\n");
+    }
+    tmpCell->camera = cameradata;
+    psMemIncrRefCounter((psMetadata *) cameradata);
+    tmpCell->analysis = NULL;
     tmpCell->readouts = psArrayAlloc(0);
     tmpCell->parent = chip;
@@ -172,7 +181,5 @@
     }
     tmpCell->valid = false;
-    tmpCell->extname = NULL;
-    tmpCell->pixels = NULL;
-    tmpCell->header = NULL;
+    tmpCell->private = NULL;
 
     psMemSetDeallocator(tmpCell, (psFreeFunc) cellFree);
@@ -180,5 +187,8 @@
 }
 
-pmChip *pmChipAlloc(pmFPA *fpa)
+pmChip *pmChipAlloc(
+    pmFPA *fpa,
+    psString name
+)
 {
     pmChip *tmpChip = (pmChip *) psAlloc(sizeof(pmChip));
@@ -189,5 +199,9 @@
     tmpChip->fromFPA = NULL;
     tmpChip->concepts = psMetadataAlloc();
-    tmpChip->analysis = psMetadataAlloc();
+    psBool rc = psMetadataAddStr(tmpChip->concepts, PS_LIST_HEAD, "CHIP.NAME", 0, NULL, name);
+    if (rc == false) {
+        psLogMsg(__func__, PS_LOG_WARN, "WARNING: Could not add CHIP.NAME to metadata.\n");
+    }
+    tmpChip->analysis = NULL;
     tmpChip->cells = psArrayAlloc(0);
     tmpChip->parent = fpa;
@@ -196,7 +210,5 @@
     }
     tmpChip->valid = false;
-    tmpChip->extname = NULL;
-    tmpChip->pixels = NULL;
-    tmpChip->header = NULL;
+    tmpChip->private = NULL;
 
     psMemSetDeallocator(tmpChip, (psFreeFunc) chipFree);
@@ -204,7 +216,5 @@
 }
 
-pmFPA *pmFPAAlloc(
-    const psMetadata *camera,
-    psDB *db)
+pmFPA *pmFPAAlloc(const psMetadata *camera)
 {
     pmFPA *tmpFPA = (pmFPA *) psAlloc(sizeof(pmFPA));
@@ -214,11 +224,10 @@
     tmpFPA->projection = NULL;
     tmpFPA->concepts = psMetadataAlloc();
-    tmpFPA->analysis = psMetadataAlloc();
+    tmpFPA->analysis = NULL;
     tmpFPA->camera = camera;
     psMemIncrRefCounter((psPtr) camera);
     tmpFPA->chips = psArrayAlloc(0);
-    tmpFPA->header = NULL;
-    tmpFPA->db = db;
-    psMemIncrRefCounter((psPtr) db);
+    tmpFPA->private = NULL;
+    tmpFPA->phu = NULL;
 
     psMemSetDeallocator(tmpFPA, (psFreeFunc) FPAFree);
@@ -739,5 +748,6 @@
 psMetadataItem *pmReadoutGetConcept(pmReadout *readout, const char *concept)
 {
-    return(psMetadataLookup(readout->concepts, concept));
+    //    return(psMetadataLookup(readout->concepts, concept));
+    return(NULL);
 }
 
Index: trunk/psModules/src/astrom/pmAstrometry.h
===================================================================
--- trunk/psModules/src/astrom/pmAstrometry.h	(revision 5356)
+++ trunk/psModules/src/astrom/pmAstrometry.h	(revision 5435)
@@ -8,6 +8,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-09-28 20:43:52 $
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-10-20 23:06:24 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -24,4 +24,11 @@
 /// @addtogroup AstroImage
 /// @{
+
+// XXXX: This is incorrect.  Must determine what p_pmHDU is.
+typedef struct
+{
+    int what;
+}
+p_pmHDU;
 
 /** Focal plane data structure
@@ -52,7 +59,6 @@
     const psMetadata *camera;           ///< Camera configuration
     psArray *chips;                     ///< The chips
-    // FITS data
-    psMetadata *header;                 ///< The FITS header, if it corresponds to this level
-    psDB *db;                           ///< Database handle
+    p_pmHDU *private;                   ///< FITS data
+    psMetadata *phu;                    ///< Primary Header
 }
 pmFPA;
@@ -86,8 +92,5 @@
     pmFPA *parent;                      ///< Parent FPA
     bool valid;                         ///< Do we bother about reading and working with this chip?
-    // FITS data
-    const char *extname;                ///< Extension name, if it corresponds to this level
-    psArray *pixels;                    ///< The pixel data, if it corresponds to this level
-    psMetadata *header;                 ///< The FITS header, if it corresponds to this level
+    p_pmHDU *private;                   ///< FITS data
 }
 pmChip;
@@ -113,12 +116,10 @@
     // Information
     psMetadata *concepts;               ///< Cache for PS concepts
+    psMetadata *camera;                 ///< Camera Info
     psMetadata *analysis;               ///< Cell-level analysis metadata
     psArray *readouts;                  ///< The readouts (referred to by number)
     pmChip *parent;                     ///< Parent chip
     bool valid;                         ///< Do we bother about reading and working with this cell?
-    // FITS data
-    const char *extname;                ///< Extension name, if it corresponds to this level
-    psArray *pixels;                    ///< The pixel data, if it corresponds to this level
-    psMetadata *header;                 ///< The FITS header, if it corresponds to this level
+    p_pmHDU *private;                   ///< FITS data
 }
 pmCell;
@@ -143,10 +144,8 @@
     // Information
     psImage *image;                     ///< Imaging area of readout
-    // XXX: The following mask was removed from the pmReadout struct in recent SDRS
-    // versions.  However, I'm keeping it here since al ot of modules still require
-    // it.
     psImage *mask;                      ///< Mask of input image
+    psImage *weight;                    ///< Weight of input image
+    psList *bias;                       ///< List of bias section (sub-)images
     psMetadata *analysis;               ///< Readout-level analysis metadata
-    psMetadata *concepts;               ///< Cache for PS Concepts
     pmCell *parent;                     ///< Parent cell
 }
@@ -178,5 +177,7 @@
  */
 pmCell *pmCellAlloc(
-    pmChip *chip                        ///< Parent chip
+    pmChip *chip,                        ///< Parent chip
+    psMetadata *cameradata,
+    psString name
 );
 
@@ -191,5 +192,9 @@
  *  @return pmChip*    newly allocated pmChip
  */
-pmChip *pmChipAlloc(pmFPA *fpa);
+pmChip *pmChipAlloc(
+    pmFPA *fpa,
+    psString name
+
+);
 
 /** Allocates a pmFPA
@@ -202,6 +207,5 @@
  */
 pmFPA *pmFPAAlloc(
-    const psMetadata *camera,           ///< Camera configuration
-    psDB *db                            ///< Database handle
+    const psMetadata *camera            ///< Camera configuration
 );
 
Index: trunk/psModules/src/config/pmConfig.c
===================================================================
--- trunk/psModules/src/config/pmConfig.c	(revision 5356)
+++ trunk/psModules/src/config/pmConfig.c	(revision 5435)
@@ -3,6 +3,6 @@
  *  @author PAP, IfA
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-10-17 23:37:11 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -404,2 +404,28 @@
     return recipe;
 }
+
+/******************************************************************************
+pmConfigDB(*site)
+ 
+XXX: What should we use for the Database namespace in the call to psDBInit()?
+This is currently NULL.
+ *****************************************************************************/
+
+psDB *pmConfigDB(
+    psMetadata *site)
+{
+    PS_ASSERT_PTR_NON_NULL(site, NULL);
+    psBool mdStatus01 = false;
+    psBool mdStatus02 = false;
+    psBool mdStatus03 = false;
+
+    psString dbServer = psMetadataLookupStr(&mdStatus01, site, "DBSERVER");
+    psString dbUsername = psMetadataLookupStr(&mdStatus02, site, "DBUSER");
+    psString dbPassword = psMetadataLookupStr(&mdStatus03, site, "DBPASSWORD");
+    if (!(mdStatus01 & mdStatus02 & mdStatus03)) {
+        psLogMsg(__func__, PS_LOG_WARN, "Could not determine database server name, userID, and password from site metadata.\n");
+        return(NULL);
+    }
+
+    return(psDBInit(dbServer, dbUsername, dbPassword, NULL));
+}
Index: trunk/psModules/src/config/pmConfig.h
===================================================================
--- trunk/psModules/src/config/pmConfig.h	(revision 5356)
+++ trunk/psModules/src/config/pmConfig.h	(revision 5435)
@@ -3,6 +3,6 @@
  *  @author PAP, IfA
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-10-17 21:34:12 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -84,3 +84,15 @@
 );
 
+/** pmConfigDB
+ * 
+ * pmConfigDB shall use the site configuration data to open a database handle.
+ * This is fairly straightforward at the moment, but will change when we beef up
+ * security. (TBD)
+ * 
+ */
+psDB *pmConfigDB(
+    psMetadata *site
+);
+
+
 #endif
Index: trunk/psModules/src/detrend/pmFlatField.c
===================================================================
--- trunk/psModules/src/detrend/pmFlatField.c	(revision 5356)
+++ trunk/psModules/src/detrend/pmFlatField.c	(revision 5435)
@@ -18,6 +18,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-28 20:43:52 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -38,8 +38,10 @@
 
 
-bool pmFlatField(pmReadout *in, pmReadout *mask, const pmReadout *flat)
+bool pmFlatField(
+    pmReadout *in,
+    const pmReadout *flat)
 {
     // XXX: Not sure if this is correct.  Must consult with IfA.
-    PS_ASSERT_PTR_NON_NULL(mask, false);
+    PS_ASSERT_PTR_NON_NULL(in->mask, false);
     int i = 0;
     int j = 0;
@@ -56,5 +58,5 @@
     // Check for nulls
     if (in == NULL) {
-        return true;       // Readout may not have data in it
+        return true;       // Readout might have data in it
     } else if(flat==NULL) {
         psError( PS_ERR_BAD_PARAMETER_NULL, true,
@@ -74,5 +76,5 @@
         return false;
     }
-    inMask = mask->image;
+    inMask = in->mask;
 
     // Check input image and its mask are not larger than flat image
Index: trunk/psModules/src/detrend/pmFlatField.h
===================================================================
--- trunk/psModules/src/detrend/pmFlatField.h	(revision 5356)
+++ trunk/psModules/src/detrend/pmFlatField.h	(revision 5435)
@@ -18,6 +18,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-28 20:43:52 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -37,5 +37,4 @@
 bool pmFlatField(
     pmReadout *in,          ///< Readout with input image
-    pmReadout *mask,        ///< Input image mask
     const pmReadout *flat   ///< Readout with flat image
 );
Index: trunk/psModules/src/detrend/pmNonLinear.c
===================================================================
--- trunk/psModules/src/detrend/pmNonLinear.c	(revision 5356)
+++ trunk/psModules/src/detrend/pmNonLinear.c	(revision 5435)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-28 20:43:52 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -56,68 +56,39 @@
 inFluxe, and the corresponding value in outFlux.  The image pixel will then
 be set to the value from outFlux.
+ 
+XXX: Must assert that filename exists.  This should probably happen in
+the lookup files.
  *****************************************************************************/
-pmReadout *pmNonLinearityLookup(pmReadout *inputReadout,
-                                const psVector *inFlux,
-                                const psVector *outFlux)
+pmReadout *pmNonLinearityLookup(
+    pmReadout *inputReadout,
+    const char *filename
+)
 {
     PS_ASSERT_PTR_NON_NULL(inputReadout,NULL);
     PS_ASSERT_PTR_NON_NULL(inputReadout->image,NULL);
     PS_ASSERT_IMAGE_TYPE(inputReadout->image, PS_TYPE_F32, NULL);
-    PS_ASSERT_PTR_NON_NULL(inFlux,NULL);
-    if (inFlux->n < 2) {
-        psError(PS_ERR_UNKNOWN,true, "pmNonLinearityLookup(): input vector less than 2 elements.  Returning inputReadout image.");
-        return(inputReadout);
-    }
-    PS_ASSERT_PTR_NON_NULL(outFlux,NULL);
-    psS32 tableSize = inFlux->n;
-    if (inFlux->n != outFlux->n) {
-        tableSize = PS_MIN(inFlux->n, outFlux->n);
+    psLookupTable *tmpLT = psLookupTableAlloc(filename, "%f %f", 0);
+    psS32 numLines = psLookupTableRead(tmpLT);
+    psS32 numPixels = 0;
+    if (numLines < 2) {
         psLogMsg(__func__, PS_LOG_WARN,
-                 "WARNING: pmNonLinear.c: pmNonLinearityLookup(): input vectors have different sizes (%d, %d)\n", inFlux->n, outFlux->n);
-    }
-    PS_ASSERT_VECTOR_TYPE(inFlux, PS_TYPE_F32, NULL);
-    PS_ASSERT_VECTOR_TYPE(outFlux, PS_TYPE_F32, NULL);
-
-    psS32 i;
-    psS32 j;
-    psS32 binNum;
-    psScalar x;
-    psS32 numPixels = 0;
-    psF32 slope;
-
-    x.type.type = PS_TYPE_F32;
-    for (i=0;i<inputReadout->image->numRows;i++) {
-        for (j=0;j<inputReadout->image->numCols;j++) {
-            x.data.F32 = inputReadout->image->data.F32[i][j];
-            binNum = p_psVectorBinDisect((psVector *)inFlux, &x);
-
-            if (binNum == -2) {
-                // We get here if x is below the table lookup range.
-                inputReadout->image->data.F32[i][j] = outFlux->data.F32[0];
-                numPixels++;
-
-            } else if (binNum == -1) {
-                // We get here if x is above the table lookup range.
-                inputReadout->image->data.F32[i][j] = outFlux->data.F32[tableSize-1];
-                numPixels++;
-
-            } else if (binNum < -2) {
-                // We get here if there was some other problem.
-                psError(PS_ERR_UNKNOWN,true, "pmNonLinearityLookup(): Could not perform p_psVectorBinDisect().  Returning inputReadout image.");
-                return(inputReadout);
-                numPixels++;
-            } else {
-                // Perform linear interpolation.
-                slope = (outFlux->data.F32[binNum+1] - outFlux->data.F32[binNum]) /
-                        (inFlux->data.F32[binNum+1]  - inFlux->data.F32[binNum]);
-                inputReadout->image->data.F32[i][j] = outFlux->data.F32[binNum] +
-                                                      ((x.data.F32 - inFlux->data.F32[binNum]) * slope);
+                 "WARNING: Lookup Table is too small.  Returning original pmReadout.\n");
+    } else {
+        for (psS32 i=0;i<inputReadout->image->numRows;i++) {
+            for (psS32 j=0;j<inputReadout->image->numCols;j++) {
+                psF64 tmpD = psLookupTableInterpolate(tmpLT, inputReadout->image->data.F32[i][j], 1);
+                if (!isnan(tmpD)) {
+                    inputReadout->image->data.F32[i][j] = tmpD;
+                } else {
+                    numPixels++;
+                }
             }
         }
+        if (numPixels > 0) {
+            psLogMsg(__func__, PS_LOG_WARN,
+                     "WARNING: pmNonLinear.c: pmNonLinearityLookup(): %d pixels outside table.", numPixels);
+        }
     }
-    if (numPixels > 0) {
-        psLogMsg(__func__, PS_LOG_WARN,
-                 "WARNING: pmNonLinear.c: pmNonLinearityLookup(): %d pixels outside table.", numPixels);
-    }
+
     return(inputReadout);
 }
Index: trunk/psModules/src/detrend/pmNonLinear.h
===================================================================
--- trunk/psModules/src/detrend/pmNonLinear.h	(revision 5356)
+++ trunk/psModules/src/detrend/pmNonLinear.h	(revision 5435)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-28 20:43:52 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -18,10 +18,13 @@
 #include "pmAstrometry.h"
 
-pmReadout *pmNonLinearityPolynomial(pmReadout *in,
-                                    const psPolynomial1D *coeff);
+pmReadout *pmNonLinearityPolynomial(
+    pmReadout *in,
+    const psPolynomial1D *coeff
+);
 
-pmReadout *pmNonLinearityLookup(pmReadout *in,
-                                const psVector *inFlux,
-                                const psVector *outFlux);
+pmReadout *pmNonLinearityLookup(
+    pmReadout *in,
+    const char *filename
+);
 
 #endif
Index: trunk/psModules/src/imsubtract/pmSubtractBias.c
===================================================================
--- trunk/psModules/src/imsubtract/pmSubtractBias.c	(revision 5356)
+++ trunk/psModules/src/imsubtract/pmSubtractBias.c	(revision 5435)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-10-12 21:02:04 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -282,12 +282,14 @@
 XXX: The SDRS does not specify type support.  F32 is implemented here.
  *****************************************************************************/
-pmReadout *pmSubtractBias(pmReadout *in,
-                          void *fitSpec,
-                          const psList *overscans,
-                          pmOverscanAxis overScanAxis,
-                          psStats *stat,
-                          psS32 nBinOrig,
-                          pmFit fit,
-                          const pmReadout *bias)
+pmReadout *pmSubtractBias(
+    pmReadout *in,
+    void *fitSpec,
+    pmFit fit,
+    bool overscan,
+    psStats *stat,
+    int nBin,
+    const pmReadout *bias,
+    const pmReadout *dark
+)
 {
     psTrace(".psModule.pmSubtracBias.pmSubtractBias", 4,
Index: trunk/psModules/src/imsubtract/pmSubtractBias.h
===================================================================
--- trunk/psModules/src/imsubtract/pmSubtractBias.h	(revision 5356)
+++ trunk/psModules/src/imsubtract/pmSubtractBias.h	(revision 5435)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-09-28 20:43:52 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -38,12 +38,17 @@
 } pmFit;
 
-pmReadout *pmSubtractBias(pmReadout *in,                ///< The input pmReadout image
-                          void *fitSpec,                ///< A polynomial or spline, defining the fit type.
-                          const psList *overscans,      ///< A psList of overscan images
-                          pmOverscanAxis overScanAxis,  ///< Defines how overscans are applied
-                          psStats *stat,                ///< The statistic to be used in combining overscan data
-                          int nBin,                     ///< The amount of binning to be done image pixels.
-                          pmFit fit,                    ///< PM_FIT_SPLINE, PM_FIT_POLYNOMIAL, or PM_FIT_NONE
-                          const pmReadout *bias);       ///< A possibly NULL bias pmReadout which is to be subtracted
+pmReadout *pmSubtractBias(
+    pmReadout *in,                      ///< The input pmReadout image
+    void *fitSpec,                      ///< A polynomial or spline, defining the fit type.
+    pmFit fit,                          ///< PM_FIT_SPLINE, PM_FIT_POLYNOMIAL, or PM_FIT_NONE
+    bool overscan,
+    psStats *stat,                      ///< The statistic to be used in combining overscan data
+    int nBin,                           ///< The amount of binning to be done image pixels.
+    const pmReadout *bias,              ///< A possibly NULL bias pmReadout which is to be subtracted
+    const pmReadout *dark               ///< A possibly NULL bias pmReadout which is to be subtracted
+)
+// OLD: remove this
+//    const psList *overscans,      ///< A psList of overscan images
+//    pmOverscanAxis overScanAxis,  ///< Defines how overscans are applied
 
 #endif
Index: trunk/psModules/src/objects/pmObjects.c
===================================================================
--- trunk/psModules/src/objects/pmObjects.c	(revision 5356)
+++ trunk/psModules/src/objects/pmObjects.c	(revision 5435)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-10-10 19:53:40 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-10-20 23:06:24 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -1445,5 +1445,5 @@
 XXX: What is mode?
 XXX: The top, bottom of the contour is not correctly determined.
-XXX EAM : this functions is using the model for the contour, but it should
+XXX EAM : this function is using the model for the contour, but it should
           be using only the image counts
 *****************************************************************************/
