Index: /trunk/psModules/psmodule.kdevses
===================================================================
--- /trunk/psModules/psmodule.kdevses	(revision 4578)
+++ /trunk/psModules/psmodule.kdevses	(revision 4579)
@@ -2,19 +2,37 @@
 <!DOCTYPE KDevPrjSession>
 <KDevPrjSession>
- <DocsAndViews NumberOfDocuments="2" >
-  <Doc0 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psModule/src/pmSubtractSky.h" >
+ <DocsAndViews NumberOfDocuments="8" >
+  <Doc0 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/ps/psModule/src/Makefile.am" >
    <View0 line="24" Type="Source" />
   </Doc0>
-  <Doc1 NumberOfViews="1" URL="file:///home/desonia/panstarrs/psModule/Makefile.am" >
-   <View0 line="2" Type="Source" />
+  <Doc1 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/ps/psModule/src/psAstrometry.h" >
+   <View0 line="402" Type="Source" />
   </Doc1>
+  <Doc2 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/ps/psModule/src/pmImageCombine.h" >
+   <View0 line="27" Type="Source" />
+  </Doc2>
+  <Doc3 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/ps/psModule/src/pmImageCombine.c" >
+   <View0 line="36" Type="Source" />
+  </Doc3>
+  <Doc4 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/ps/psModule/src/pmObjects.c" >
+   <View0 line="1464" Type="Source" />
+  </Doc4>
+  <Doc5 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/ps/psModule/src/pmObjects.h" >
+   <View0 line="261" Type="Source" />
+  </Doc5>
+  <Doc6 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/ps/psModule/src/psAstrometry.c" >
+   <View0 line="26" Type="Source" />
+  </Doc6>
+  <Doc7 NumberOfViews="1" URL="file:/home/drobbin/panstarrs/ps/psModule/test/tst_pmImageCombine.c" >
+   <View0 line="0" Type="Source" />
+  </Doc7>
  </DocsAndViews>
  <pluginList>
-  <kdevdebugger>
-   <breakpointList/>
-  </kdevdebugger>
   <kdevbookmarks>
    <bookmarks/>
   </kdevbookmarks>
+  <kdevsubversion>
+   <subversion recurseresolve="1" recurserelocate="1" recursemerge="1" recursecommit="1" base="" recursepropget="1" recurseswitch="1" recurseupdate="1" recursepropset="1" recursediff="1" recurserevert="1" forcemove="1" recursecheckout="1" forceremove="1" recurseadd="1" recurseproplist="1" forcemerge="1" />
+  </kdevsubversion>
   <kdevvalgrind>
    <executable path="" params="" />
@@ -23,4 +41,7 @@
    <kcachegrind path="" />
   </kdevvalgrind>
+  <kdevdebugger>
+   <breakpointList/>
+  </kdevdebugger>
  </pluginList>
 </KDevPrjSession>
Index: /trunk/psModules/src/Makefile.am
===================================================================
--- /trunk/psModules/src/Makefile.am	(revision 4578)
+++ /trunk/psModules/src/Makefile.am	(revision 4579)
@@ -9,5 +9,6 @@
   pmReadoutCombine.c \
   pmSubtractBias.c \
-  pmSubtractSky.c
+  pmSubtractSky.c \
+  psAstrometry.c
 
 libpsmodule_a_HEADERS = pmFlatFieldErrors.h \
@@ -21,5 +22,6 @@
   pmReadoutCombine.h \
   pmSubtractBias.h \
-  pmSubtractSky.h
+  pmSubtractSky.h \
+  psAstrometry.h
 
 EXTRA_DIST = psErrorCodes.dat
Index: /trunk/psModules/src/pmFlatField.h
===================================================================
--- /trunk/psModules/src/pmFlatField.h	(revision 4578)
+++ /trunk/psModules/src/pmFlatField.h	(revision 4579)
@@ -18,9 +18,13 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-22 19:58:57 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
+
+#include "pslib.h"
+#include "psAstrometry.h"
+
 
 /** Execute flat field module.
Index: /trunk/psModules/src/pmImageSubtract.c
===================================================================
--- /trunk/psModules/src/pmImageSubtract.c	(revision 4578)
+++ /trunk/psModules/src/pmImageSubtract.c	(revision 4579)
@@ -7,6 +7,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-29 01:17:23 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -65,5 +65,5 @@
     stamp->status = status;
 
-    psMemSetDeallocator(stamp, (psFreeFcn)p_pmStampFree);
+    psMemSetDeallocator(stamp, (psFreeFunc)p_pmStampFree);
 
     return(stamp);
@@ -88,5 +88,5 @@
 
     tmp->type = type;
-    psMemSetDeallocator(tmp, (psFreeFcn) p_pmSubtractionKernelsFree);
+    psMemSetDeallocator(tmp, (psFreeFunc) p_pmSubtractionKernelsFree);
     return(tmp);
 }
Index: /trunk/psModules/src/pmMaskBadPixels.h
===================================================================
--- /trunk/psModules/src/pmMaskBadPixels.h	(revision 4578)
+++ /trunk/psModules/src/pmMaskBadPixels.h	(revision 4579)
@@ -19,6 +19,6 @@
  *  @author Ross Harman, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2004-09-17 00:49:04 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,4 +26,5 @@
 
 #include "pslib.h"
+#include "psAstrometry.h"
 
 /** Mask values */
Index: /trunk/psModules/src/pmNonLinear.h
===================================================================
--- /trunk/psModules/src/pmNonLinear.h	(revision 4578)
+++ /trunk/psModules/src/pmNonLinear.h	(revision 4579)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-01-17 19:58:18 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -16,4 +16,5 @@
 
 #include "pslib.h"
+#include "psAstrometry.h"
 
 psReadout *pmNonLinearityPolynomial(psReadout *in,
Index: /trunk/psModules/src/pmObjects.c
===================================================================
--- /trunk/psModules/src/pmObjects.c	(revision 4578)
+++ /trunk/psModules/src/pmObjects.c	(revision 4579)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.29 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-13 20:00:49 $
+ *  @version $Revision: 1.30 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -108,5 +108,5 @@
     }
 
-    psMemSetDeallocator(tmp, (psFreeFcn) modelFree);
+    psMemSetDeallocator(tmp, (psFreeFunc) modelFree);
     return(tmp);
 }
@@ -138,5 +138,5 @@
     tmp->models = NULL;
     tmp->type = 0;
-    psMemSetDeallocator(tmp, (psFreeFcn) sourceFree);
+    psMemSetDeallocator(tmp, (psFreeFunc) sourceFree);
 
     return(tmp);
@@ -1895,7 +1895,8 @@
     params->data.F32[6] = Sxy;
 *****************************************************************************/
-psF64 pmMinLM_Gauss2D(psVector *deriv,
-                      psVector *params,
-                      psVector *x)
+float pmMinLM_Gauss2D(
+    psVector *deriv,
+    const psVector *params,
+    const psVector *x)
 {
     PS_ASSERT_VECTOR_NON_NULL(params, NAN);
@@ -1931,7 +1932,8 @@
     params->data.F32[6] = Sxy;
 *****************************************************************************/
-psF64 pmMinLM_PsuedoGauss2D(psVector *deriv,
-                            psVector *params,
-                            psVector *x)
+float pmMinLM_PsuedoGauss2D(
+    psVector *deriv,
+    const psVector *params,
+    const psVector *x)
 {
     PS_ASSERT_VECTOR_NON_NULL(params, NAN);
@@ -1971,7 +1973,8 @@
     params->data.F32[8] = B3;
 *****************************************************************************/
-psF64 pmMinLM_Wauss2D(psVector *deriv,
-                      psVector *params,
-                      psVector *x)
+float pmMinLM_Wauss2D(
+    psVector *deriv,
+    const psVector *params,
+    const psVector *x)
 {
     PS_ASSERT_VECTOR_NON_NULL(params, NAN);
@@ -2019,7 +2022,8 @@
     params->data.F32[10] = N;
 *****************************************************************************/
-psF64 pmMinLM_TwistGauss2D(psVector *deriv,
-                           psVector *params,
-                           psVector *x)
+float pmMinLM_TwistGauss2D(
+    psVector *deriv,
+    const psVector *params,
+    const psVector *x)
 {
     PS_ASSERT_VECTOR_NON_NULL(params, NAN);
@@ -2077,7 +2081,8 @@
     params->data.F32[7] = Nexp;
 *****************************************************************************/
-psF64 pmMinLM_Sersic(psVector *deriv,
-                     psVector *params,
-                     psVector *x)
+float pmMinLM_Sersic(
+    psVector *deriv,
+    const psVector *params,
+    const psVector *x)
 {
     PS_ASSERT_VECTOR_NON_NULL(params, NAN);
@@ -2102,7 +2107,8 @@
     params->data.F32[11] = Nexp;
 *****************************************************************************/
-psF64 pmMinLM_SersicCore(psVector *deriv,
-                         psVector *params,
-                         psVector *x)
+float pmMinLM_SersicCore(
+    psVector *deriv,
+    const psVector *params,
+    const psVector *x)
 {
     PS_ASSERT_VECTOR_NON_NULL(params, NAN);
Index: /trunk/psModules/src/pmObjects.h
===================================================================
--- /trunk/psModules/src/pmObjects.h	(revision 4578)
+++ /trunk/psModules/src/pmObjects.h	(revision 4579)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-09 06:19:27 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -209,50 +209,57 @@
 XXX EAM: psMinimizeLMChi2Func returns psF64, not psF32
  *****************************************************************************/
-psF64 pmMinLM_Gauss2D(psVector *deriv,  ///< A possibly-NULL structure for the output derivatives
-                      psVector *params,  ///< A psVector which holds the parameters of this function
-                      psVector *x  ///< A psVector which holds the row/col coordinate
-                     );
-
-/******************************************************************************
- *****************************************************************************/
-psF64 pmMinLM_PsuedoGauss2D(psVector *deriv, ///< A possibly-NULL structure for the output derivatives
-                            psVector *params, ///< A psVector which holds the parameters of this function
-                            psVector *x  ///< A psVector which holds the row/col coordinate
-                           );
-
-/******************************************************************************
- *****************************************************************************/
-psF64 pmMinLM_Wauss2D(psVector *deriv,  ///< A possibly-NULL structure for the output derivatives
-                      psVector *params,  ///< A psVector which holds the parameters of this function
-                      psVector *x  ///< A psVector which holds the row/col coordinate
-                     );
-
-/******************************************************************************
- *****************************************************************************/
-psF64 pmMinLM_TwistGauss2D(psVector *deriv, ///< A possibly-NULL structure for the output derivatives
-                           psVector *params, ///< A psVector which holds the parameters of this function
-                           psVector *x  ///< A psVector which holds the row/col coordinate
-                          );
-
-/******************************************************************************
- *****************************************************************************/
-psF64 pmMinLM_Sersic(psVector *deriv,  ///< A possibly-NULL structure for the output derivatives
-                     psVector *params,  ///< A psVector which holds the parameters of this function
-                     psVector *x  ///< A psVector which holds the row/col coordinate
-                    );
-
-/******************************************************************************
- *****************************************************************************/
-psF64 pmMinLM_SersicCore(psVector *deriv, ///< A possibly-NULL structure for the output derivatives
-                         psVector *params, ///< A psVector which holds the parameters of this function
-                         psVector *x  ///< A psVector which holds the row/col coordinate
-                        );
-
-/******************************************************************************
- *****************************************************************************/
-psF64 pmMinLM_PsuedoSersic(psVector *deriv, ///< A possibly-NULL structure for the output derivatives
-                           psVector *params, ///< A psVector which holds the parameters of this function
-                           psVector *x  ///< A psVector which holds the row/col coordinate
-                          );
+float pmMinLM_Gauss2D(
+    psVector *deriv,                   ///< A possibly-NULL structure for the output derivatives
+    const psVector *params,            ///< A psVector which holds the parameters of this function
+    const psVector *x                  ///< A psVector which holds the row/col coordinate
+);
+
+/******************************************************************************
+ *****************************************************************************/
+float pmMinLM_PsuedoGauss2D(
+    psVector *deriv, ///< A possibly-NULL structure for the output derivatives
+    const psVector *params, ///< A psVector which holds the parameters of this function
+    const psVector *x  ///< A psVector which holds the row/col coordinate
+);
+
+/******************************************************************************
+ *****************************************************************************/
+float pmMinLM_Wauss2D(
+    psVector *deriv,  ///< A possibly-NULL structure for the output derivatives
+    const psVector *params,  ///< A psVector which holds the parameters of this function
+    const psVector *x  ///< A psVector which holds the row/col coordinate
+);
+
+/******************************************************************************
+ *****************************************************************************/
+float pmMinLM_TwistGauss2D(
+    psVector *deriv, ///< A possibly-NULL structure for the output derivatives
+    const psVector *params, ///< A psVector which holds the parameters of this function
+    const psVector *x  ///< A psVector which holds the row/col coordinate
+);
+
+/******************************************************************************
+ *****************************************************************************/
+float pmMinLM_Sersic(
+    psVector *deriv,  ///< A possibly-NULL structure for the output derivatives
+    const psVector *params,  ///< A psVector which holds the parameters of this function
+    const psVector *x  ///< A psVector which holds the row/col coordinate
+);
+
+/******************************************************************************
+ *****************************************************************************/
+float pmMinLM_SersicCore(
+    psVector *deriv, ///< A possibly-NULL structure for the output derivatives
+    const psVector *params, ///< A psVector which holds the parameters of this function
+    const psVector *x  ///< A psVector which holds the row/col coordinate
+);
+
+/******************************************************************************
+ *****************************************************************************/
+float pmMinLM_PsuedoSersic(
+    psVector *deriv, ///< A possibly-NULL structure for the output derivatives
+    const psVector *params, ///< A psVector which holds the parameters of this function
+    const psVector *x  ///< A psVector which holds the row/col coordinate
+);
 
 
Index: /trunk/psModules/src/pmReadoutCombine.h
===================================================================
--- /trunk/psModules/src/pmReadoutCombine.h	(revision 4578)
+++ /trunk/psModules/src/pmReadoutCombine.h	(revision 4579)
@@ -5,6 +5,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-05 22:55:05 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -23,4 +23,5 @@
 #include "pslib.h"
 #include "psConstants.h"
+#include "psAstrometry.h"
 
 typedef struct
Index: /trunk/psModules/src/pmSubtractBias.c
===================================================================
--- /trunk/psModules/src/pmSubtractBias.c	(revision 4578)
+++ /trunk/psModules/src/pmSubtractBias.c	(revision 4579)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-07 22:13:42 $
+ *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -352,5 +352,5 @@
 
             PS_ASSERT_IMAGE_TYPE(myOverscanImage, PS_TYPE_F32, NULL);
-            psStats *rc = psImageStats(myStats, myOverscanImage, NULL, 0xffffffff);
+            psStats *rc = psImageStats(myStats, myOverscanImage, NULL, (psMaskType)0xffffffff);
             if (rc == NULL) {
                 psError(PS_ERR_UNKNOWN, false, "psImageStats(): could not perform requested statistical operation.  Returning in image.\n");
Index: /trunk/psModules/src/pmSubtractBias.h
===================================================================
--- /trunk/psModules/src/pmSubtractBias.h	(revision 4578)
+++ /trunk/psModules/src/pmSubtractBias.h	(revision 4579)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-07 22:20:55 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -23,4 +23,5 @@
 #include<math.h>
 #include "pslib.h"
+#include "psAstrometry.h"
 
 typedef enum {
Index: /trunk/psModules/src/pmSubtractSky.h
===================================================================
--- /trunk/psModules/src/pmSubtractSky.h	(revision 4578)
+++ /trunk/psModules/src/pmSubtractSky.h	(revision 4579)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-04-05 22:55:05 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -23,4 +23,5 @@
 #include<math.h>
 #include "pslib.h"
+#include "psAstrometry.h"
 
 // XXX: this is pmFit in pmSubtractBias.c, named psFit here.
Index: /trunk/psModules/src/psAstrometry.c
===================================================================
--- /trunk/psModules/src/psAstrometry.c	(revision 4578)
+++ /trunk/psModules/src/psAstrometry.c	(revision 4579)
@@ -8,6 +8,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-07-18 18:48:29 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -25,8 +25,9 @@
 #include "psError.h"
 #include "psConstants.h"
-#include "psAstronomyErrors.h"
+//#include "psAstronomyErrors.h"
 #include "psMatrix.h"
 #include "psTrace.h"
 #include "psLogMsg.h"
+
 
 /*****************************************************************************
@@ -35,4 +36,5 @@
 psImage.
  *****************************************************************************/
+/*
 static psS32 checkValidImageCoords(double x,
                                    double y,
@@ -40,14 +42,14 @@
 {
     PS_ASSERT_IMAGE_NON_NULL(tmpImage, 0);
-
+ 
     if ((x < 0.0) || (x > (double)tmpImage->numCols) ||
             (y < 0.0) || (y > (double)tmpImage->numRows)) {
         return (0);
     }
-
+ 
     return (1);
 }
-
-
+*/
+/*
 static void FPAFree(psFPA* fpa)
 {
@@ -65,5 +67,7 @@
     }
 }
-
+*/
+
+/*
 static void chipFree(psChip* chip)
 {
@@ -75,5 +79,7 @@
     }
 }
-
+*/
+
+/*
 static void cellFree(psCell* cell)
 {
@@ -88,4 +94,5 @@
     }
 }
+*/
 
 static void readoutFree(psReadout* readout)
@@ -99,4 +106,5 @@
 }
 
+/*
 static void observatoryFree(psObservatory* obs)
 {
@@ -105,5 +113,6 @@
     }
 }
-
+*/
+/*
 static void exposureFree(psExposure* exp)
 {
@@ -115,5 +124,6 @@
     }
 }
-
+*/
+/*
 static void fixedPatternFree(psFixedPattern* fp)
 {
@@ -122,14 +132,14 @@
             psFree(fp->x[i]);
         }
-
+ 
         for (psS32 j = 0; j < fp->p_ps_yRows; j++) {
             psFree(fp->y[j]);
         }
-
+ 
         psFree(fp->x);
         psFree(fp->y);
     }
 }
-
+*/
 /*****************************************************************************/
 /* FUNCTION IMPLEMENTATION - PUBLIC                                          */
@@ -141,58 +151,59 @@
  * XXX: This assumes that x,y must be of type F64
  */
+/*
 psFixedPattern* psFixedPatternAlloc(double x0,
-                                    double y0,
-                                    double xScale,
-                                    double yScale,
-                                    const psImage *x,
-                                    const psImage *y)
-{
-    psFixedPattern *tmp;
-    psS32 i;
-    psS32 j;
-
-    PS_ASSERT_IMAGE_NON_NULL(x, NULL);
-    PS_ASSERT_IMAGE_NON_NULL(y, NULL);
-    PS_ASSERT_IMAGE_TYPE(x, PS_TYPE_F64, NULL);
-    PS_ASSERT_IMAGE_TYPE(y, PS_TYPE_F64, NULL);
-
-    tmp = (psFixedPattern *) psAlloc(sizeof(psFixedPattern));
-    // XXX: Is this correct?
-    tmp->nX = (x->numCols * x->numRows);
-    tmp->nY = (y->numCols * y->numRows);
-    tmp->x0 = x0;
-    tmp->y0 = y0;
-    tmp->xScale = xScale;
-    tmp->yScale = yScale;
-    tmp->p_ps_xRows = x->numRows;
-    tmp->p_ps_xCols = x->numCols;
-    tmp->p_ps_yRows = y->numRows;
-    tmp->p_ps_yCols = y->numCols;
-    tmp->x = (double **) psAlloc(x->numRows * sizeof(double *));
-    for (i=0;i<x->numRows;i++) {
-        (tmp->x)[i] = (double *) psAlloc(x->numCols * sizeof(double));
-    }
-    for (i=0;i<x->numRows;i++) {
-        for (j=0;j<x->numCols;j++) {
-            (tmp->x)[i][j] = x->data.F64[i][j];
-        }
-    }
-
-    tmp->y = (double **) psAlloc(y->numRows * sizeof(double *));
-    for (i=0;i<y->numRows;i++) {
-        (tmp->y)[i] = (double *) psAlloc(y->numCols * sizeof(double));
-    }
-    for (i=0;i<y->numRows;i++) {
-        for (j=0;j<y->numCols;j++) {
-            (tmp->y)[i][j] = y->data.F64[i][j];
-        }
-    }
-
-    psMemSetDeallocator(tmp,(psFreeFunc)fixedPatternFree);
-
-    return(tmp);
-}
-
-
+                                   double y0,
+                                   double xScale,
+                                   double yScale,
+                                   const psImage *x,
+                                   const psImage *y)
+{
+   psFixedPattern *tmp;
+   psS32 i;
+   psS32 j;
+
+   PS_ASSERT_IMAGE_NON_NULL(x, NULL);
+   PS_ASSERT_IMAGE_NON_NULL(y, NULL);
+   PS_ASSERT_IMAGE_TYPE(x, PS_TYPE_F64, NULL);
+   PS_ASSERT_IMAGE_TYPE(y, PS_TYPE_F64, NULL);
+
+   tmp = (psFixedPattern *) psAlloc(sizeof(psFixedPattern));
+   // XXX: Is this correct?
+   tmp->nX = (x->numCols * x->numRows);
+   tmp->nY = (y->numCols * y->numRows);
+   tmp->x0 = x0;
+   tmp->y0 = y0;
+   tmp->xScale = xScale;
+   tmp->yScale = yScale;
+   tmp->p_ps_xRows = x->numRows;
+   tmp->p_ps_xCols = x->numCols;
+   tmp->p_ps_yRows = y->numRows;
+   tmp->p_ps_yCols = y->numCols;
+   tmp->x = (double **) psAlloc(x->numRows * sizeof(double *));
+   for (i=0;i<x->numRows;i++) {
+       (tmp->x)[i] = (double *) psAlloc(x->numCols * sizeof(double));
+   }
+   for (i=0;i<x->numRows;i++) {
+       for (j=0;j<x->numCols;j++) {
+           (tmp->x)[i][j] = x->data.F64[i][j];
+       }
+   }
+
+   tmp->y = (double **) psAlloc(y->numRows * sizeof(double *));
+   for (i=0;i<y->numRows;i++) {
+       (tmp->y)[i] = (double *) psAlloc(y->numCols * sizeof(double));
+   }
+   for (i=0;i<y->numRows;i++) {
+       for (j=0;j<y->numCols;j++) {
+           (tmp->y)[i][j] = y->data.F64[i][j];
+       }
+   }
+
+   psMemSetDeallocator(tmp,(psFreeFunc)fixedPatternFree);
+
+   return(tmp);
+}
+*/
+/*
 psExposure* psExposureAlloc(double ra,
                             double dec,
@@ -210,5 +221,5 @@
 {
     PS_ASSERT_PTR_NON_NULL(observatory, NULL);
-
+ 
     psExposure* exp = psAlloc(sizeof(psExposure));
     *(double *)&exp->ra = ra;
@@ -223,8 +234,8 @@
     *(float *)&exp->exposureTime = exposureTime;
     *(float *)&exp->wavelength = wavelength;
-
+ 
     exp->time = psMemIncrRefCounter((psPtr)time);
     exp->observatory = psMemIncrRefCounter((psPtr)observatory);
-
+ 
     // XXX: how is this value derived?
     *(double *)&exp->lst = psTimeToLMST((psTime*)time,observatory->longitude);
@@ -235,10 +246,11 @@
     exp->cameraName = NULL;
     exp->telescopeName = NULL;
-
+ 
     psMemSetDeallocator(exp,(psFreeFunc)exposureFree);
-
+ 
     return exp;
 }
-
+*/
+/*
 psObservatory* psObservatoryAlloc(const char* name,
                                   double latitude,
@@ -248,5 +260,5 @@
 {
     psObservatory* obs = psAlloc(sizeof(psObservatory));
-
+ 
     if (name == NULL) {
         obs->name = NULL;
@@ -255,22 +267,23 @@
         strcpy((char*)obs->name, name);
     }
-
+ 
     *(double *)&obs->latitude = latitude;
     *(double *)&obs->longitude = longitude;
     *(double *)&obs->height = height;
     *(double *)&obs->tlr = tlr;
-
+ 
     psMemSetDeallocator(obs,(psFreeFunc)observatoryFree);
-
+ 
     return obs;
 }
-
+*/
+/*
 psFPA* psFPAAlloc(psS32 nChips,
                   const psExposure* exp)
 {
     PS_ASSERT_INT_NONNEGATIVE(nChips, NULL);
-
+ 
     psFPA* newFPA = psAlloc(sizeof(psFPA));
-
+ 
     // create array of NULL chips of the size nChips
     newFPA->chips = psArrayAlloc(nChips);
@@ -280,10 +293,10 @@
     }
     newFPA->chips->n = 0; // per requirement
-
+ 
     newFPA->metadata = NULL;
     newFPA->fromTangentPlane = NULL;
     newFPA->toTangentPlane = NULL;
     newFPA->pattern = NULL;
-
+ 
     if (exp != NULL) {
         newFPA->exposure = psMemIncrRefCounter((psExposure*)exp);
@@ -293,28 +306,29 @@
         newFPA->grommit = NULL;
     }
-
+ 
     newFPA->colorPlus = NULL;
     newFPA->colorMinus = NULL;
     newFPA->projection = NULL;
-
+ 
     newFPA->rmsX = 0.0f;
     newFPA->rmsY = 0.0f;
     newFPA->chi2 = 0.0f;
-
+ 
     psMemSetDeallocator(newFPA,(psFreeFunc)FPAFree);
-
+ 
     return newFPA;
 }
-
+*/
 /*
  * psChip constructor
  */
+/*
 psChip* psChipAlloc(psS32 nCells,
                     psFPA *parentFPA)
 {
     PS_ASSERT_INT_NONNEGATIVE(nCells, NULL);
-
+ 
     psChip* chip = psAlloc(sizeof(psChip));
-
+ 
     // create array of NULL psCells
     int n = (nCells > 0) ? nCells : 1;
@@ -325,31 +339,32 @@
     }
     chip->cells->n = 0; // per requirement
-
+ 
     *(int*)&chip->row0 = 0;
     *(int*)&chip->col0 = 0;
-
+ 
     chip->metadata = NULL;
-
+ 
     chip->toFPA = NULL;
     chip->fromFPA = NULL;
-
+ 
     chip->parent = parentFPA;
-
+ 
     psMemSetDeallocator(chip,(psFreeFunc)chipFree);
-
+ 
     return chip;
-
-}
-
+ 
+}
+*/
 /*
  * psCell constructor
  */
+/*
 psCell* psCellAlloc(psS32 nReadouts,
                     psChip* parentChip)
 {
     PS_ASSERT_INT_NONNEGATIVE(nReadouts, NULL);
-
+ 
     psCell* cell = psAlloc(sizeof(psCell));
-
+ 
     // create array of NULL psReadouts
     int n = (nReadouts > 0) ? nReadouts : 1;
@@ -360,10 +375,10 @@
     }
     cell->readouts->n = 0; // per requirement
-
+ 
     *(int*)&cell->row0 = 0;
     *(int*)&cell->col0 = 0;
-
+ 
     cell->metadata = NULL;
-
+ 
     cell->toChip = NULL;
     cell->fromChip = NULL;
@@ -371,14 +386,14 @@
     cell->toTP = NULL;
     cell->toSky = NULL;
-
+ 
     cell->parent = parentChip;
-
+ 
     psMemSetDeallocator(cell,(psFreeFunc)cellFree);
-
+ 
     return cell;
-
-
-}
-
+ 
+ 
+}
+*/
 psReadout* psReadoutAlloc()
 {
@@ -402,12 +417,13 @@
 }
 
+/*
 psGrommit* psGrommitAlloc(const psExposure* exp)
 {
     PS_ASSERT_PTR_NON_NULL(exp, NULL);
-
+ 
     psSphere* polarMotion = p_psTimeGetPoleCoords(exp->time);
-
+ 
     psGrommit* grommit = (psGrommit* ) psAlloc(sizeof(psGrommit));
-
+ 
     *(double*)&grommit->latitude = exp->observatory->latitude;
     *(double*)&grommit->longitude = exp->observatory->longitude;
@@ -422,10 +438,11 @@
     *(double*)&grommit->refractB = polarMotion->d; // XXX: need to figure out what to set here too.
     *(double*)&grommit->siderealTime = psTimeToMJD(exp->time); // XXX: this is probably not correct
-
+ 
     psFree(polarMotion);
-
+ 
     return (grommit);
 }
-
+*/
+/*
 psCell* psCellInFPA(const psPlane* fpaCoord,
                     const psFPA* FPA)
@@ -433,9 +450,9 @@
     PS_ASSERT_PTR_NON_NULL(fpaCoord, NULL);
     PS_ASSERT_PTR_NON_NULL(FPA, NULL);
-
+ 
     psChip* tmpChip = NULL;
     psPlane chipCoord;
     psCell* outCell = NULL;
-
+ 
     // Determine which chip contains the fpaCoords.
     tmpChip = psChipInFPA(fpaCoord, FPA);
@@ -443,14 +460,15 @@
         return(NULL);
     }
-
+ 
     // Convert to those chip coordinates.
     psCoordFPAToChip(&chipCoord, fpaCoord, tmpChip);
-
+ 
     // Determine which cell contains those chip coordinates.
     outCell = psCellInChip(&chipCoord, tmpChip);
-
+ 
     return (outCell);
 }
-
+*/
+/*
 psChip* psChipInFPA(const psPlane* fpaCoord,
                     const psFPA* FPA)
@@ -459,21 +477,21 @@
     PS_ASSERT_PTR_NON_NULL(FPA, NULL);
     PS_ASSERT_PTR_NON_NULL(FPA->chips, NULL);
-
+ 
     psArray* chips = FPA->chips;
     psS32 nChips = chips->n;
     psPlane chipCoord;
     psCell *tmpCell = NULL;
-
+ 
     // Loop through every chip in this FPA.  Convert the original FPA
     // coordinates to chip coordinates for that chip.  Then, determine if any
     // cells in that chip contain those chip coordinates.
-
+ 
     for (psS32 i = 0; i < nChips; i++) {
         psChip* tmpChip = chips->data[i];
         PS_ASSERT_PTR_NON_NULL(tmpChip, NULL);
         PS_ASSERT_PTR_NON_NULL(tmpChip->fromFPA, NULL);
-
+ 
         psPlaneTransformApply(&chipCoord, tmpChip->fromFPA, fpaCoord);
-
+ 
         tmpCell = psCellInChip(&chipCoord, tmpChip);
         if (tmpCell != NULL) {
@@ -481,9 +499,10 @@
         }
     }
-
+ 
     // XXX: Print warning here?
     return (NULL);
 }
-
+*/
+/*
 psCell* psCellInChip(const psPlane* chipCoord,
                      const psChip* chip)
@@ -491,17 +510,17 @@
     PS_ASSERT_PTR_NON_NULL(chipCoord, NULL);
     PS_ASSERT_PTR_NON_NULL(chip, NULL);
-
+ 
     psPlane cellCoord;
     psArray* cells;
-
+ 
     cells = chip->cells;
     if (cells == NULL) {
         return NULL;
     }
-
+ 
     // We loop over each cell in the chip.  We transform the chipCoord into
     // a cellCoord for that cell and determine if that cellCoord is valid.
     // If so, then we return that cell.
-
+ 
     for (psS32 i = 0; i < cells->n; i++) {
         psCell* tmpCell = (psCell* ) cells->data[i];
@@ -509,14 +528,14 @@
         PS_ASSERT_PTR_NON_NULL(tmpCell->fromChip, NULL);
         psArray* readouts = tmpCell->readouts;
-
+ 
         if (readouts != NULL) {
             for (psS32 j = 0; j < readouts->n; j++) {
                 psReadout* tmpReadout = readouts->data[j];
                 PS_ASSERT_READOUT_NON_NULL(tmpReadout, NULL);
-
+ 
                 psPlaneTransformApply(&cellCoord,
                                       tmpCell->fromChip,
                                       chipCoord);
-
+ 
                 if (checkValidImageCoords(cellCoord.x,
                                           cellCoord.y,
@@ -527,8 +546,9 @@
         }
     }
-
+ 
     return (NULL);
 }
-
+*/
+/*
 psPlane* psCoordCellToChip(psPlane* outCoord,
                            const psPlane* inCoord,
@@ -537,8 +557,9 @@
     PS_ASSERT_PTR_NON_NULL(inCoord, NULL);
     PS_ASSERT_PTR_NON_NULL(cell, NULL);
-
+ 
     return (psPlaneTransformApply(outCoord, cell->toChip, inCoord));
 }
-
+*/
+/*
 psPlane* psCoordChipToFPA(psPlane* outCoord,
                           const psPlane* inCoord,
@@ -547,8 +568,9 @@
     PS_ASSERT_PTR_NON_NULL(inCoord, NULL);
     PS_ASSERT_PTR_NON_NULL(chip, NULL);
-
+ 
     return (psPlaneTransformApply(outCoord, chip->toFPA, inCoord));
 }
-
+*/
+/*
 psPlane* psCoordFPAToTP(psPlane* outCoord,
                         const psPlane* inCoord,
@@ -559,12 +581,13 @@
     PS_ASSERT_PTR_NON_NULL(inCoord, NULL);
     PS_ASSERT_PTR_NON_NULL(fpa, NULL);
-
+ 
     return(psPlaneDistortApply(outCoord, fpa->toTangentPlane, inCoord,
                                color, magnitude));
 }
-
+*/
 /*****************************************************************************
 XXX: What about units for the (x,y) coords?
  *****************************************************************************/
+/*
 psSphere* psCoordTPToSky(psSphere* outSphere,
                          const psPlane* tpCoord,
@@ -573,17 +596,18 @@
     PS_ASSERT_PTR_NON_NULL(tpCoord, NULL);
     PS_ASSERT_PTR_NON_NULL(grommit, NULL);
-
+ 
     if (outSphere == NULL) {
         outSphere = (psSphere* ) psAlloc(sizeof(psSphere));
     }
-
+ 
     // XXX: this was done by a SLALIB call -- needs to be reimplemented
     psWarning("Warning!  psCoordTPToSky functionality is no longer implemented");
-    /* slaAopqk(tpCoord->x, tpCoord->y, (double*)grommit,
-             &AOB, &ZOB, &HOB, &outSphere->r, &outSphere->d); */
-
+    // slaAopqk(tpCoord->x, tpCoord->y, (double*)grommit,
+    //         &AOB, &ZOB, &HOB, &outSphere->r, &outSphere->d);
+ 
     return (outSphere);
 }
-
+*/
+/*
 psPlane* psCoordCellToFPA(psPlane* fpaCoord,
                           const psPlane* cellCoord,
@@ -592,8 +616,9 @@
     PS_ASSERT_PTR_NON_NULL(cellCoord, NULL);
     PS_ASSERT_PTR_NON_NULL(cell, NULL);
-
+ 
     return (psPlaneTransformApply(fpaCoord, cell->toFPA, cellCoord));
 }
-
+*/
+/*
 psSphere* psCoordCellToSky(psSphere* skyCoord,
                            const psPlane* cellCoord,
@@ -609,30 +634,32 @@
     PS_ASSERT_PTR_NON_NULL(cell->parent->parent->toTangentPlane, NULL);
     PS_ASSERT_PTR_NON_NULL(cell->parent->parent->exposure, NULL);
-
+ 
     psPlane* fpaCoord = NULL;
     psPlane* tpCoord = NULL;
     psFPA* parFPA = (cell->parent)->parent;
     psGrommit* tmpGrommit = NULL;
-
+ 
     // Convert the input cell coordinates to FPA coordinates.
     fpaCoord = psPlaneTransformApply(fpaCoord, cell->toFPA, cellCoord);
-
+ 
     // Convert the FPA coordinates to tangent plane Coordinates.
     tpCoord = psPlaneDistortApply(tpCoord, parFPA->toTangentPlane,
                                   fpaCoord, color, magnitude);
-
+ 
     // Generate a grommit for this FPA.
     tmpGrommit = psGrommitAlloc(parFPA->exposure);
-
+ 
     // Convert the tangent plane Coordinates to sky coordinates.
     skyCoord = psCoordTPToSky(skyCoord, tpCoord, tmpGrommit);
-
+ 
     psFree(fpaCoord);
     psFree(tpCoord);
     psFree(tmpGrommit);
-
+ 
     return(skyCoord);
 }
-
+ 
+*/
+/*
 psSphere* psCoordCellToSkyQuick(psSphere* outSphere,
                                 const psPlane* cellCoord,
@@ -650,34 +677,36 @@
                  "WARNING: psCoordCellToSkyQuick(): The cell->toSky transform is ignored.  The cell->toTP transform is being used.");
     }
-
+ 
     psPlane *tpCoord = NULL;
     psChip *chip = cell->parent;
     psFPA *FPA = chip->parent;
     psProjectionType oldProjectionType;
-
+ 
     if (outSphere == NULL) {
         outSphere = (psSphere* ) psAlloc(sizeof(psSphere));
     }
-
+ 
     // Determine the tangent plane coordinates.
     tpCoord = psPlaneTransformApply(NULL, cell->toTP, cellCoord);
-
+ 
     // Save the old projection type and set the new projection type to TAN.
     oldProjectionType = FPA->projection->type;
     FPA->projection->type = PS_PROJ_TAN;
-
+ 
     // Deproject the tangent plane coordinates a sphere.
     outSphere = psDeproject(tpCoord, FPA->projection);
-
+ 
     // Restore old projection type.  Free memory.
     FPA->projection->type = oldProjectionType;
     psFree(tpCoord);
-
+ 
     return (outSphere);
 }
+*/
 
 /*****************************************************************************
 XXX: What about units for the (x,y) coords?
  *****************************************************************************/
+/*
 psPlane* psCoordSkyToTP(psPlane* tpCoord,
                         const psSphere* in,
@@ -686,19 +715,19 @@
     PS_ASSERT_PTR_NON_NULL(in, NULL);
     PS_ASSERT_PTR_NON_NULL(grommit, NULL);
-
+ 
     // char* type = "RA";
-
+ 
     if (tpCoord == NULL) {
         tpCoord = (psPlane* ) psAlloc(sizeof(psPlane));
     }
-
+ 
     // XXX: this was done by a SLALIB call -- needs to be reimplemented
     psWarning("Warning!  psCoordSkyToTP functionality is no longer implemented");
-    /* slaOapqk(type, in->r, in->d, (double*)grommit, &tpCoord->x, &tpCoord->y); */
-
+    // slaOapqk(type, in->r, in->d, (double*)grommit, &tpCoord->x, &tpCoord->y);
+ 
     return(tpCoord);
 }
-
-
+*/
+/*
 psPlane* psCoordTPToFPA(psPlane* fpaCoord,
                         const psPlane* tpCoord,
@@ -710,9 +739,10 @@
     PS_ASSERT_PTR_NON_NULL(fpa, NULL);
     PS_ASSERT_PTR_NON_NULL(fpa->fromTangentPlane, NULL);
-
+ 
     return (psPlaneDistortApply(fpaCoord, fpa->fromTangentPlane,
                                 tpCoord, color, magnitude));
 }
-
+*/
+/*
 psPlane* psCoordFPAToChip(psPlane* chipCoord,
                           const psPlane* fpaCoord,
@@ -722,9 +752,10 @@
     PS_ASSERT_PTR_NON_NULL(chip, NULL);
     PS_ASSERT_PTR_NON_NULL(chip->fromFPA, NULL);
-
+ 
     chipCoord = psPlaneTransformApply(chipCoord, chip->fromFPA, fpaCoord);
     return(chipCoord);
 }
-
+*/
+/*
 psPlane* psCoordChipToCell(psPlane* cellCoord,
                            const psPlane* chipCoord,
@@ -734,9 +765,10 @@
     PS_ASSERT_PTR_NON_NULL(cell, NULL);
     PS_ASSERT_PTR_NON_NULL(cell->fromChip, NULL);
-
+ 
     cellCoord = psPlaneTransformApply(cellCoord, cell->fromChip, chipCoord);
     return(cellCoord);
 }
-
+*/
+/*
 psPlane* psCoordSkyToCell(psPlane* cellCoord,
                           const psSphere* skyCoord,
@@ -750,29 +782,30 @@
     PS_ASSERT_PTR_NON_NULL(cell->parent->parent, NULL);
     PS_ASSERT_PTR_NON_NULL(cell->parent->parent->grommit, NULL);
-
+ 
     psChip *parChip = cell->parent;
     psFPA *parFPA = parChip->parent;
     psGrommit* grommit = parFPA->grommit;
-
+ 
     // Convert the skyCoords to tangent plane coords.
     psPlane *tpCoord = psCoordSkyToTP(tpCoord, skyCoord, grommit);
-
+ 
     // Convert the tangent plane coords to FPA coords.
     psPlane *fpaCoord = psCoordTPToFPA(fpaCoord, tpCoord, color,
                                        magnitude, parFPA);
-
+ 
     // Convert the FPA coords to chip coords.
     psPlane *chipCoord = psCoordFPAToChip(chipCoord, fpaCoord, parChip);
-
+ 
     // Convert the chip coords to cell coords.
     cellCoord = psCoordChipToCell(cellCoord, chipCoord, cell);
-
+ 
     psFree(tpCoord);
     psFree(fpaCoord);
     psFree(chipCoord);
-
+ 
     return (cellCoord);
 }
-
+*/
+/*
 psPlane* psCoordSkyToCellQuick(psPlane* cellCoord,
                                const psSphere* skyCoord,
@@ -790,5 +823,5 @@
                  "WARNING: psCoordSkyToCellQuick(): The cell->toSky transform is ignored.  The cell->toTP transform is being used.");
     }
-
+ 
     psPlane *tpCoord = NULL;
     psChip *whichChip = cell->parent;
@@ -796,15 +829,15 @@
     psProjectionType oldProjectionType;
     psPlaneTransform *TPtoCell = NULL;
-
+ 
     // Save the old projection type and set the new projection type to TAN.
     oldProjectionType = whichFPA->projection->type;
     whichFPA->projection->type = PS_PROJ_TAN;
-
+ 
     if (cellCoord == NULL) {
         cellCoord = (psPlane* ) psAlloc(sizeof(psPlane));
     }
-
+ 
     tpCoord = psProject(skyCoord, whichFPA->projection);
-
+ 
     // generate an error if cell->toTP is not linear.
     if (0 == p_psIsProjectionLinear(cell->toTP)) {
@@ -813,8 +846,8 @@
                 "cell to tangent plane");
     }
-
+ 
     TPtoCell = p_psPlaneTransformLinearInvert(cell->toTP);
     cellCoord = psPlaneTransformApply(cellCoord, TPtoCell, tpCoord);
-
+ 
     // Restore old projection type.  Free memory.
     whichFPA->projection->type = oldProjectionType;
@@ -822,5 +855,5 @@
     return (cellCoord);
 }
-
-
-
+*/
+
+
Index: /trunk/psModules/src/psAstrometry.h
===================================================================
--- /trunk/psModules/src/psAstrometry.h	(revision 4578)
+++ /trunk/psModules/src/psAstrometry.h	(revision 4579)
@@ -8,6 +8,6 @@
 *  @author GLG, MHPCC
 *
-*  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2005-07-18 18:48:29 $
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2005-07-19 01:44:48 $
 *
 *  Copyright 2004-2005 Maui High Performance Computing Center, University of Hawaii
@@ -17,18 +17,12 @@
 #define PS_ASTROMETRY_H
 
-#include "psType.h"
-#include "psImage.h"
-#include "psArray.h"
-#include "psList.h"
-#include "psFunctions.h"
-#include "psMetadata.h"
-#include "psCoord.h"
-#include "psPhotometry.h"
-
+#include "pslib.h"
+
+/*
 struct psCell;
 struct psChip;
 struct psFPA;
 struct psExposure;
-
+*/
 /// @addtogroup AstroImage
 /// @{
@@ -42,19 +36,23 @@
  *
  */
+
+/*
 typedef struct
 {
-    const double latitude;           ///< geodetic latitude (radians)
-    const double longitude;          ///< longitude + ... (radians)
-    const double height;             ///< height (HM)
-    const double abberationMag;      ///< magnitude of diurnal aberration vector
-    const double temperature;        ///< ambient temperature (TDK)
-    const double pressure;           ///< pressure (PMB)
-    const double humidity;           ///< relative humidity (RH)
-    const double wavelength;         ///< wavelength (WL)
-    const double lapseRate;          ///< lapse rate (TLR)
-    const double refractA, refractB; ///< refraction constants A and B (radians)
-    const double siderealTime;       ///< local apparent sidereal time (radians)
+   const double latitude;           ///< geodetic latitude (radians)
+   const double longitude;          ///< longitude + ... (radians)
+   const double height;             ///< height (HM)
+   const double abberationMag;      ///< magnitude of diurnal aberration vector
+   const double temperature;        ///< ambient temperature (TDK)
+   const double pressure;           ///< pressure (PMB)
+   const double humidity;           ///< relative humidity (RH)
+   const double wavelength;         ///< wavelength (WL)
+   const double lapseRate;          ///< lapse rate (TLR)
+   const double refractA, refractB; ///< refraction constants A and B (radians)
+   const double siderealTime;       ///< local apparent sidereal time (radians)
 }
 psGrommit;
+*/
+
 
 /** Fixed Pattern Corrections
@@ -67,4 +65,5 @@
  *  of the grid in x and y as well as the origin of the grid.
  */
+/*
 typedef struct
 {
@@ -84,6 +83,8 @@
 }
 psFixedPattern;
+*/
 
 /** Readout data structure.
+ 
  *
  *  A readout is the result of a single read of a cell (or a portion thereof).
@@ -121,13 +122,14 @@
  *
  */
+/*
 typedef struct
 {
     const psS32 col0;                  ///< Offset from the left of chip
     const psS32 row0;                  ///< Offset from the bottom of chip
-
+ 
     psArray* readouts;                 ///< readouts from the cell
-
+ 
     psMetadata* metadata;              ///< cell-level metadata
-
+ 
     psPlaneTransform* toChip;          ///< transformations from cell to chip coordinates
     psPlaneTransform* fromChip;        ///< transformations from cell to chip coordinates
@@ -135,8 +137,9 @@
     psPlaneTransform* toTP;            ///< transformations from cell to FPA coordinates
     psPlaneTransform* toSky;           ///< transformations from cell to tangent plane coordinates
-
+ 
     struct psChip* parent;             ///< chip in which contains this cell
 }
 psCell;
+*/
 
 /** Chip data structure
@@ -148,19 +151,20 @@
  *
  */
-typedef struct psChip
+/*typedef struct psChip
 {
     const psS32 col0;                  ///< Offset from the left of FPA
     const psS32 row0;                  ///< Offset from the bottom of FPA
-
+ 
     psArray* cells;                    ///< cells in the chip
-
+ 
     psMetadata* metadata;              ///< chip-level metadata
-
+ 
     psPlaneTransform* toFPA;           ///< transformation from chip to FPA coordinates
     psPlaneTransform* fromFPA;         ///< transformation from FPA to chip coordinates
-
+ 
     struct psFPA* parent;              ///< FPA which contains this chip
 }
 psChip;
+*/
 
 /** A Focal-Plane
@@ -177,20 +181,20 @@
  *
  */
-typedef struct psFPA
+/*typedef struct psFPA
 {
     psArray* chips;                    ///< chips in the focal plane array
     psMetadata* metadata;              ///< focal-plane's metadata
-
+ 
     psPlaneDistort* fromTangentPlane;  ///< transformation from tangent plane to focal plane
     psPlaneDistort* toTangentPlane;    ///< transformation from focal plane to tangent plane
     psFixedPattern* pattern;           ///< fixed pattern residual offsets
-
+ 
     const struct psExposure* exposure; ///< information about this exposure
     psGrommit *grommit;                ///< Wallace's grommit
-
+ 
     psPhotSystem* colorPlus;           ///< Color reference
     psPhotSystem* colorMinus;          ///< Color reference
     psProjection *projection;          ///< projection
-
+ 
     float rmsX;                        ///< RMS for x transformation fits
     float rmsY;                        ///< RMS for y transformation fits
@@ -198,4 +202,5 @@
 }
 psFPA;
+*/
 
 /** Observatory Information
@@ -204,5 +209,5 @@
  *
  */
-typedef struct
+/*typedef struct
 {
     const char* name;                  ///< Name of observatory
@@ -213,4 +218,5 @@
 }
 psObservatory;
+*/
 
 /** Exposure Information
@@ -221,5 +227,5 @@
  *
  */
-typedef struct psExposure
+/*typedef struct psExposure
 {
     const double ra;                   ///< Telescope boresight, right ascention
@@ -236,6 +242,6 @@
     const float wavelength;            ///< Wavelength in microns
     const psObservatory* observatory;  ///< Observatory data
-
-    /* Derived quantities */
+ 
+    // Derived quantities
     const double lst;                  ///< Local Sidereal Time
     const float positionAngle;         ///< Position angle
@@ -247,4 +253,5 @@
 }
 psExposure;
+*/
 
 /** Allocator for psFixedPattern struct
@@ -255,5 +262,5 @@
  *  @return psFixedPattern*     New psFixedPattern struct.
  */
-psFixedPattern* psFixedPatternAlloc(
+/*psFixedPattern* psFixedPatternAlloc(
     double x0,           ///< X Position of 0,0 corner on focal plane
     double y0,           ///< Y Position of 0,0 corner on focal plane
@@ -263,5 +270,5 @@
     const psImage *y     ///< The grid of offsets in y
 );
-
+*/
 
 /** Allocator for psExposure
@@ -273,5 +280,5 @@
  *  @return     psExposure*    New psExposure struct
  */
-psExposure* psExposureAlloc(
+/*psExposure* psExposureAlloc(
     double ra,                         ///< Telescope boresight, right ascention
     double dec,                        ///< Telescope boresight, declination
@@ -288,4 +295,5 @@
     const psObservatory* observatory   ///< Observatory data
 );
+*/
 
 /** Allocator for psObservatory
@@ -296,5 +304,5 @@
  *  @return psObservatory*    new psObservatory struct
  */
-psObservatory* psObservatoryAlloc(
+/*psObservatory* psObservatoryAlloc(
     const char* name,                  ///< Name of observatory
     double latitude,                   ///< Latitude of observatory, east positive
@@ -303,4 +311,5 @@
     double tlr                         ///< Tropospheric Lapse Rate
 );
+*/
 
 /** Allocator for psFPA
@@ -313,8 +322,9 @@
  *  @return psFPA*    a newly allocated psFPA
  */
-psFPA* psFPAAlloc(
+/*psFPA* psFPAAlloc(
     psS32 nChips,                        ///< number of chips in the FPA
     const psExposure* exp              ///< the exposure information
 );
+*/
 
 /** Allocates a psChip
@@ -326,8 +336,9 @@
  *  @return psChip*    newly allocated psChip
  */
-psChip* psChipAlloc(
+/*psChip* psChipAlloc(
     psS32 nCells,                        ///< number of cells in Chip
     psFPA* parentFPA                   ///< parent FPA
 );
+*/
 
 /** Allocates a psCell
@@ -339,8 +350,9 @@
  *  @return psCell*    newly allocated psCell
  */
-psCell* psCellAlloc(
+/*psCell* psCellAlloc(
     psS32 nReadouts,                     ///< number of readouts in cell
     psChip* parentChip                 ///< parent Chip
 );
+*/
 
 /** Allocates a psReadout
@@ -360,7 +372,8 @@
  *  @return psGrommit* New grommit structure.
  */
-psGrommit* psGrommitAlloc(
+/*psGrommit* psGrommitAlloc(
     const psExposure* exp              ///< the cooresponding exposure structure.
 );
+*/
 
 /** Find cooresponding cell for given FPA coordinate
@@ -368,8 +381,9 @@
  *  @return psCell*    the cell cooresponding to the coord in FPA
  */
-psCell* psCellInFPA(
+/*psCell* psCellInFPA(
     const psPlane* coord,              ///< the coordinate in FPA plane
     const psFPA* FPA                   ///< the FPA to search for the cell
 );
+*/
 
 /** Find cooresponding chip for given FPA coordinate
@@ -377,8 +391,9 @@
  *  @return psChip*    the chip cooresponding to coord
  */
-psChip* psChipInFPA(
+/*psChip* psChipInFPA(
     const psPlane* coord,              ///< the coordinate in FPA plane
     const psFPA* FPA                   ///< the FPA to search for the cell
 );
+*/
 
 /** Find cooresponding cell for given Chip coordinate
@@ -386,8 +401,9 @@
  *  @return psCell*    the cell cooresponding to coord
  */
-psCell* psCellInChip(
+/*psCell* psCellInChip(
     const psPlane* coord,              ///< the coordinate in Chip plane
     const psChip* chip                 ///< the chip to search for the cell
 );
+*/
 
 /** Translate a cell coordinate into a chip coordinate
@@ -395,9 +411,10 @@
  *  @return psPlane*    the resulting chip coordinate
  */
-psPlane* psCoordCellToChip(
+/*psPlane* psCoordCellToChip(
     psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     const psPlane* in,                 ///< the coordinate within Cell
     const psCell* cell                 ///< the Cell in interest
 );
+*/
 
 /** Translate a chip coordinate into a FPA coordinate
@@ -405,9 +422,10 @@
  *  @return psPlane*    the resulting FPA coordinate
  */
-psPlane* psCoordChipToFPA(
+/*psPlane* psCoordChipToFPA(
     psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     const psPlane* in,                 ///< the coordinate within Chip
     const psChip* chip                 ///< the chip in interest
 );
+*/
 
 /** Translate a FPA coordinate into a Tangent Plane coordinate
@@ -415,5 +433,5 @@
  *  @return psPlane*    the resulting Tangent Plane coordinate
  */
-psPlane* psCoordFPAToTP(
+/*psPlane* psCoordFPAToTP(
     psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     const psPlane* in,                 ///< the coordinate within FPA
@@ -422,4 +440,5 @@
     const psFPA* fpa                   ///< the FPA in interest
 );
+*/
 
 /** Translate a Tangent Plane coordinate into a Sky coordinate
@@ -427,9 +446,10 @@
  *  @return psSphere*    the resulting Sky coordinate
  */
-psSphere* psCoordTPToSky(
+/*psSphere* psCoordTPToSky(
     psSphere* out,                     ///< a sphere struct to recycle. If NULL, a new struct is created
     const psPlane* in,                 ///< the coordinate within Tangent Plane
     const psGrommit* grommit           ///< the grommit of the tangent plane
 );
+*/
 
 /** Translate a cell coordinate into a FPA coordinate
@@ -437,9 +457,10 @@
  *  @return psPlane*    the resulting FPA coordinate
  */
-psPlane* psCoordCellToFPA(
+/*psPlane* psCoordCellToFPA(
     psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     const psPlane* in,                 ///< the coordinate within cell
     const psCell* cell                 ///< the cell in interest
 );
+*/
 
 /** Translate a cell coordinate into a Sky coordinate
@@ -447,5 +468,5 @@
  *  @return psSphere*    the resulting Sky coordinate
  */
-psSphere* psCoordCellToSky(
+/*psSphere* psCoordCellToSky(
     psSphere* out,                     ///< a sphere struct to recycle. If NULL, a new struct is created
     const psPlane* in,                 ///< the coordinate within cell
@@ -454,4 +475,5 @@
     const psCell* cell                 ///< the cell in interest
 );
+*/
 
 /** Translate a cell coordinate into a Sky coordinate using a 'quick and
@@ -460,9 +482,10 @@
  *  @return psSphere*    the resulting Sky coordinate
  */
-psSphere* psCoordCellToSkyQuick(
+/*psSphere* psCoordCellToSkyQuick(
     psSphere* out,                     ///< a sphere struct to recycle. If NULL, a new struct is created
     const psPlane* in,                 ///< the coordinate within cell
     const psCell* cell                 ///< the cell in interest
 );
+*/
 
 /** Translate a Sky coordinate into a Tangent Plane coordinate
@@ -470,9 +493,10 @@
  *  @return psPlane*    the resulting Tangent Plane coordinate
  */
-psPlane* psCoordSkyToTP(
+/*psPlane* psCoordSkyToTP(
     psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     const psSphere* in,                ///< the sky coordinate
     const psGrommit* grommit           ///< the grommit
 );
+*/
 
 /** Translate a Tangent Plane coordinate into a FPA coordinate
@@ -480,5 +504,5 @@
  *  @return psPlane*    the resulting FPA coordinate
  */
-psPlane* psCoordTPToFPA(
+/*psPlane* psCoordTPToFPA(
     psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     const psPlane* in,                 ///< the coordinate within tangent plane
@@ -487,4 +511,5 @@
     const psFPA* fpa                   ///< the FPA of interest
 );
+*/
 
 /** Translate a FPA coordinate into a chip coordinate
@@ -492,9 +517,10 @@
  *  @return psPlane*    the resulting chip coordinate
  */
-psPlane* psCoordFPAToChip(
+/*psPlane* psCoordFPAToChip(
     psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     const psPlane* in,                 ///< the FPA coordinate
     const psChip* chip                 ///< the chip of interest
 );
+*/
 
 /** Translate a chip coordinate into a cell coordinate
@@ -502,9 +528,10 @@
  *  @return psPlane*    the resulting cell coordinate
  */
-psPlane* psCoordChipToCell(
+/*psPlane* psCoordChipToCell(
     psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     const psPlane* in,                 ///< the Chip coordinate
     const psCell* cell                 ///< the cell of interest
 );
+*/
 
 /** Translate a sky coordinate into a cell coordinate
@@ -512,5 +539,5 @@
  *  @return psPlane*    the resulting cell coordinate
  */
-psPlane* psCoordSkyToCell(
+/*psPlane* psCoordSkyToCell(
     psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     const psSphere* in,                ///< the Sky coordinate
@@ -519,4 +546,5 @@
     const psCell* cell                 ///< the cell of interest
 );
+*/
 
 /** Translate a sky coordinate into a cell coordinate using a 'quick and
@@ -525,10 +553,10 @@
  *  @return psPlane*    the resulting cell coordinate
  */
-psPlane* psCoordSkyToCellQuick(
+/*psPlane* psCoordSkyToCellQuick(
     psPlane* out,                      ///< a plane struct to recycle. If NULL, a new struct is created
     const psSphere* in,                ///< the Sky coordinate
     const psCell* cell                 ///< the cell of interest
 );
-
+*/
 
 #endif // #ifndef PS_ASTROMETRY_H
Index: /trunk/psModules/test/tst_pmImageCombine.c
===================================================================
--- /trunk/psModules/test/tst_pmImageCombine.c	(revision 4578)
+++ /trunk/psModules/test/tst_pmImageCombine.c	(revision 4579)
@@ -9,6 +9,6 @@
  *  XXX: Must verify the results internally.  Don't use stdout file.
  *
- *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-16 23:13:43 $
+ *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -266,5 +266,5 @@
 
     if (questionablePixels->n != numImages) {
-        printf("TEST ERROR: pmCombineImages(): questionablePixels->n was %d, should have been %d\n",
+        printf("TEST ERROR: pmCombineImages(): questionablePixels->n was %ld, should have been %d\n",
                questionablePixels->n, numImages);
         testStatus = true;
@@ -313,5 +313,5 @@
         for (psS32 i = 0 ; i < pixelRejects->n ; i++) {
             psPixels *myPixels = (psPixels *) pixelRejects->data[i];
-            printf("tst_pmImageCombine.c: Image %d had %d rejects.\n", i, myPixels->n);
+            printf("tst_pmImageCombine.c: Image %d had %ld rejects.\n", i, myPixels->n);
 
             for (psS32 p = 0 ; p < myPixels->n ; p++) {
Index: /trunk/psModules/test/tst_pmImageSubtract.c
===================================================================
--- /trunk/psModules/test/tst_pmImageSubtract.c	(revision 4578)
+++ /trunk/psModules/test/tst_pmImageSubtract.c	(revision 4579)
@@ -10,6 +10,6 @@
  *  data.  More work need to be done to verify the results.
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-28 23:28:18 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -337,5 +337,5 @@
     // Create a test image and set a single pixel in the center of each stamp.
     psImage *tstImg = psImageAlloc(numCols, numRows, PS_TYPE_F32);
-    psS32 numStamps = 0;
+    int numStamps = 0;
     PS_IMAGE_SET_F32(tstImg, 0.0);
     for (psS32 j = 0; j < yNum; j++) {
@@ -407,5 +407,5 @@
     } else {
         if (stamps->n != numStamps) {
-            printf("TEST ERROR: %d stamps were found, %d were expected.\n",
+            printf("TEST ERROR: %ld stamps were found, %d were expected.\n",
                    stamps->n, numStamps);
             testStatus = true;
@@ -443,5 +443,5 @@
     } else {
         if (stamps->n != numStamps) {
-            printf("TEST ERROR: %d stamps were found, %d were expected.\n",
+            printf("TEST ERROR: %ld stamps were found, %d were expected.\n",
                    stamps->n, numStamps);
             testStatus = true;
Index: /trunk/psModules/test/tst_pmObjects01.c
===================================================================
--- /trunk/psModules/test/tst_pmObjects01.c	(revision 4578)
+++ /trunk/psModules/test/tst_pmObjects01.c	(revision 4579)
@@ -19,6 +19,6 @@
  * abd never deallocate, no error is generated.
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-06-13 19:59:21 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-07-19 01:44:48 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -128,5 +128,5 @@
     } else {
         if ((tmpModel->params->n != 7) || (tmpModel->dparams->n != 7)) {
-            printf("TEST ERROR: pmModelAlloc(PS_MODEL_GAUSS) allocated an incorrect number of params (%d, %d)\n",
+            printf("TEST ERROR: pmModelAlloc(PS_MODEL_GAUSS) allocated an incorrect number of params (%ld, %ld)\n",
                    tmpModel->params->n, tmpModel->dparams->n);
             testStatus = false;
@@ -150,5 +150,5 @@
     } else {
         if ((tmpModel->params->n != 7) || (tmpModel->dparams->n != 7)) {
-            printf("TEST ERROR: pmModelAlloc(PS_MODEL_PGAUSS) allocated an incorrect number of params (%d, %d)\n",
+            printf("TEST ERROR: pmModelAlloc(PS_MODEL_PGAUSS) allocated an incorrect number of params (%ld, %ld)\n",
                    tmpModel->params->n, tmpModel->dparams->n);
             testStatus = false;
@@ -172,5 +172,5 @@
     } else {
         if ((tmpModel->params->n != 11) || (tmpModel->dparams->n != 11)) {
-            printf("TEST ERROR: pmModelAlloc(PS_MODEL_TWIST_GAUSS) allocated an incorrect number of params (%d, %d)\n",
+            printf("TEST ERROR: pmModelAlloc(PS_MODEL_TWIST_GAUSS) allocated an incorrect number of params (%ld, %ld)\n",
                    tmpModel->params->n, tmpModel->dparams->n);
             testStatus = false;
@@ -194,5 +194,5 @@
     } else {
         if ((tmpModel->params->n != 9) || (tmpModel->dparams->n != 9)) {
-            printf("TEST ERROR: pmModelAlloc(PS_MODEL_WAUSS) allocated an incorrect number of params (%d, %d)\n",
+            printf("TEST ERROR: pmModelAlloc(PS_MODEL_WAUSS) allocated an incorrect number of params (%ld, %ld)\n",
                    tmpModel->params->n, tmpModel->dparams->n);
             testStatus = false;
@@ -216,5 +216,5 @@
     } else {
         if ((tmpModel->params->n != 8) || (tmpModel->dparams->n != 8)) {
-            printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC) allocated an incorrect number of params (%d, %d)\n",
+            printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC) allocated an incorrect number of params (%ld, %ld)\n",
                    tmpModel->params->n, tmpModel->dparams->n);
             testStatus = false;
@@ -238,5 +238,5 @@
     } else {
         if ((tmpModel->params->n != 12) || (tmpModel->dparams->n != 12)) {
-            printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC_CORE) allocated an incorrect number of params (%d, %d)\n",
+            printf("TEST ERROR: pmModelAlloc(PS_MODEL_SERSIC_CORE) allocated an incorrect number of params (%ld, %ld)\n",
                    tmpModel->params->n, tmpModel->dparams->n);
             testStatus = false;
@@ -290,5 +290,5 @@
     } else {
         if (outData->n != 1) {
-            printf("TEST ERROR: outData->n is %d\n", outData->n);
+            printf("TEST ERROR: outData->n is %ld\n", outData->n);
             testStatus = false;
         }
@@ -316,5 +316,5 @@
 
         if (outData->n != 0) {
-            printf("TEST ERROR: outData->n is %d\n", outData->n);
+            printf("TEST ERROR: outData->n is %ld\n", outData->n);
             testStatus = false;
         }
@@ -344,5 +344,5 @@
 
         if (outData->n != 1) {
-            printf("TEST ERROR: outData->n is %d\n", outData->n);
+            printf("TEST ERROR: outData->n is %ld\n", outData->n);
             testStatus = false;
         }
@@ -370,5 +370,5 @@
 
         if (outData->n != 0) {
-            printf("TEST ERROR: outData->n is %d\n", outData->n);
+            printf("TEST ERROR: outData->n is %ld\n", outData->n);
             testStatus = false;
         }
@@ -398,5 +398,5 @@
 
         if (outData->n != n/2) {
-            printf("TEST ERROR: outData->n is %d\n", outData->n);
+            printf("TEST ERROR: outData->n is %ld\n", outData->n);
             testStatus = false;
         }
@@ -423,5 +423,5 @@
 
         if (outData->n != 0) {
-            printf("TEST ERROR: outData->n is %d\n", outData->n);
+            printf("TEST ERROR: outData->n is %ld\n", outData->n);
             testStatus = false;
         }
@@ -477,5 +477,5 @@
 
 /******************************************************************************
-test02(): 
+test02():
 // XXX: Must test flat peaks.
 // XXX: test 1-by-n and n-by-1 images.
@@ -539,5 +539,5 @@
         }
         if (outData->n != expectedNumPeaks) {
-            printf("TEST ERROR: pmFindImagePeaks found %d peaks (should be %d)\n", outData->n, expectedNumPeaks);
+            printf("TEST ERROR: pmFindImagePeaks found %ld peaks (should be %d)\n", outData->n, expectedNumPeaks);
             testStatus = false;
         }
@@ -681,5 +681,5 @@
     /* XXX: Modify for new pmCullPeaks
         outData = pmCullPeaks(outData, PS_MAX_F32, NULL);
-     
+
         if (outData == NULL) {
             printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
@@ -702,8 +702,8 @@
     printf("Calling pmCullPeaks with tiny maxValue and NULL psRegion.\n");
     outData = pmFindImagePeaks(imgData, 0.0);
-    printf("pmFindImagePeaks found %d peaks\n", outData->n);
+    printf("pmFindImagePeaks found %ld peaks\n", outData->n);
     /* XXX: Modify for new pmCullPeaks
         outData = pmCullPeaks(outData, 0.0, NULL);
-     
+
         if (outData == NULL) {
             printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
@@ -726,10 +726,10 @@
     printf("Calling pmCullPeaks with large maxValue and disjoint psRegion.\n");
     outData = pmFindImagePeaks(imgData, 0.0);
-    printf("pmFindImagePeaks found %d peaks\n", outData->n);
+    printf("pmFindImagePeaks found %ld peaks\n", outData->n);
     psRegion tmpRegion = psRegionSet(10000.0, 20000.0, 10000.0, 20000.0);
 
     /* XXX: Modify for new pmCullPeaks
         outData = pmCullPeaks(outData, PS_MAX_F32, tmpRegion);
-     
+
         if (outData == NULL) {
             printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
@@ -752,9 +752,9 @@
     printf("Calling pmCullPeaks with large maxValue and non-disjoint psRegion.\n");
     outData = pmFindImagePeaks(imgData, 0.0);
-    printf("pmFindImagePeaks found %d peaks\n", outData->n);
+    printf("pmFindImagePeaks found %ld peaks\n", outData->n);
     tmpRegion = psRegionSet(-PS_MAX_F32, PS_MAX_F32, -PS_MAX_F32, PS_MAX_F32);
     /* XXX: Modify for new pmCullPeaks
         outData = pmCullPeaks(outData, PS_MAX_F32, tmpRegion);
-     
+
         if (outData == NULL) {
             printf("TEST ERROR: pmCullPeaks() returned a non-NULL psList.\n");
@@ -1145,5 +1145,5 @@
             testStatus = false;
         }
-     
+
         printf("----------------------------------------------------------------------------------\n");
         printf("Calling pmSourceSetPixelsCircle with subImage endCol > numCols.  Should generate error and return NULL.\n");
@@ -1156,5 +1156,5 @@
             testStatus = false;
         }
-     
+
         printf("----------------------------------------------------------------------------------\n");
         printf("Calling pmSourceSetPixelsCircle with subImage startRow < 0.  Should generate error and return NULL.\n");
@@ -1167,5 +1167,5 @@
             testStatus = false;
         }
-     
+
         printf("----------------------------------------------------------------------------------\n");
         printf("Calling pmSourceSetPixelsCircle with subImage endRow > numRows.  Should generate error and return NULL.\n");
Index: /trunk/psModules/test/verified/tst_pmImageCombine.stderr
===================================================================
--- /trunk/psModules/test/verified/tst_pmImageCombine.stderr	(revision 4578)
+++ /trunk/psModules/test/verified/tst_pmImageCombine.stderr	(revision 4579)
@@ -24,11 +24,2 @@
 ---> TESTPOINT PASSED (Test Point Driver{pmCombineImages()} | tst_pmImageCombine.c)
 
-/***************************** TESTPOINT ******************************************\
-*             TestFile: tst_pmImageCombine.c                                       *
-*            TestPoint: Test Point Driver{pmRejectPixels()}                        *
-*             TestType: Positive                                                   *
-\**********************************************************************************/
-
-
----> TESTPOINT PASSED (Test Point Driver{pmRejectPixels()} | tst_pmImageCombine.c)
-
Index: /trunk/psModules/test/verified/tst_pmImageCombine.stdout
===================================================================
--- /trunk/psModules/test/verified/tst_pmImageCombine.stdout	(revision 4578)
+++ /trunk/psModules/test/verified/tst_pmImageCombine.stdout	(revision 4579)
@@ -1,3 +1,13 @@
 Testing pmCombineImages(10, 10, 5)
+Generating a bad pixel in image (1) at (0, 8)
+Generating a bad pixel in image (3) at (7, 5)
+Generating a bad pixel in image (1) at (1, 2)
+Generating a bad pixel in image (2) at (9, 9)
+Generating a bad pixel in image (1) at (3, 9)
+Generating a bad pixel in image (2) at (0, 5)
+Generating a bad pixel in image (1) at (4, 5)
+Generating a bad pixel in image (1) at (3, 8)
+Generating a bad pixel in image (2) at (6, 2)
+Generating a bad pixel in image (2) at (3, 7)
 Calling with a NULL images.  Should generate error, return NULL.
 Calling with a long images.  Should generate error, return NULL.
@@ -19,3 +29,19 @@
 Image 2, questionable pixel 3 is (3 7)
 Image 3, questionable pixel 0 is (7 5)
-Testing pmRejectPixels(10, 10, 5, 1.000000, 1.000000)
+
+
+
+Calling pmRejectPixels() with acceptable data.  Should generate a psArray.
+tst_pmImageCombine.c: Image 0 had 0 rejects.
+tst_pmImageCombine.c: Image 1 had 4 rejects.
+Image 1, rejected pixel 0 is (0 8)
+Image 1, rejected pixel 1 is (1 2)
+Image 1, rejected pixel 2 is (4 5)
+Image 1, rejected pixel 3 is (3 8)
+tst_pmImageCombine.c: Image 2 had 3 rejects.
+Image 2, rejected pixel 0 is (0 5)
+Image 2, rejected pixel 1 is (6 2)
+Image 2, rejected pixel 2 is (3 7)
+tst_pmImageCombine.c: Image 3 had 1 rejects.
+Image 3, rejected pixel 0 is (7 5)
+tst_pmImageCombine.c: Image 4 had 0 rejects.
Index: /trunk/psModules/test/verified/tst_pmImageSubtract.stderr
===================================================================
--- /trunk/psModules/test/verified/tst_pmImageSubtract.stderr	(revision 4578)
+++ /trunk/psModules/test/verified/tst_pmImageSubtract.stderr	(revision 4579)
@@ -23,19 +23,19 @@
 \**********************************************************************************/
 
-<DATE><TIME>|<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
+<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
     Unallowable operation: psImage image or its data is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
+<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
     Error: xNum is 0 or less.
-<DATE><TIME>|<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
+<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
     Error: yNum is 0 or less.
-<DATE><TIME>|<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
+<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
     Error: border is 0 or less.
-<DATE><TIME>|<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
+<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
     Unallowable operation: psImage image or its data is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
+<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
     Error: xNum is 0 or less.
-<DATE><TIME>|<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
+<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
     Error: yNum is 0 or less.
-<DATE><TIME>|<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
+<HOST>|E|pmSubtractionFindStamps (FILE:LINENO)
     Error: border is 0 or less.
 
@@ -48,63 +48,47 @@
 \**********************************************************************************/
 
-<DATE><TIME>|<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
+<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
     Unallowable operation: stamps is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
+<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
     Unallowable operation: psImage reference or its data is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
+<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
     Unallowable operation: psImage input or its data is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
+<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
     Unallowable operation: kernels is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionSolveEquation (FILE:LINENO)
+<HOST>|E|pmSubtractionSolveEquation (FILE:LINENO)
     Unallowable operation: stamps is NULL.
-<DATE><TIME>|<HOST>|W|psVectorStats
-    WARNING: psVectorStats(): p_psVectorSampleMean() returned an error.
-<DATE><TIME>|<HOST>|W|psVectorStats
-    WARNING: psVectorStats(): p_psVectorSampleMean() returned an error.
-<DATE><TIME>|<HOST>|W|psVectorStats
-    WARNING: psVectorStats(): p_psVectorSampleMean() returned an error.
-<DATE><TIME>|<HOST>|W|psVectorStats
-    WARNING: psVectorStats(): p_psVectorSampleMean() returned an error.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Unallowable operation: psVector solution or its data is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Unallowable operation: kernels is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Error: x, -2.000000, is out of range.  Must be between -1.000000 and 1.000000.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Error: x, 2.000000, is out of range.  Must be between -1.000000 and 1.000000.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Error: y, -2.000000, is out of range.  Must be between -1.000000 and 1.000000.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Error: y, 2.000000, is out of range.  Must be between -1.000000 and 1.000000.
-<DATE><TIME>|<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
+<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
     Unallowable operation: stamps is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
+<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
     Unallowable operation: psImage reference or its data is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
+<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
     Unallowable operation: psImage input or its data is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
+<HOST>|E|pmSubtractionCalculateEquation (FILE:LINENO)
     Unallowable operation: kernels is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionSolveEquation (FILE:LINENO)
+<HOST>|E|pmSubtractionSolveEquation (FILE:LINENO)
     Unallowable operation: stamps is NULL.
-<DATE><TIME>|<HOST>|W|psVectorStats
-    WARNING: psVectorStats(): p_psVectorSampleMean() returned an error.
-<DATE><TIME>|<HOST>|W|psVectorStats
-    WARNING: psVectorStats(): p_psVectorSampleMean() returned an error.
-<DATE><TIME>|<HOST>|W|psVectorStats
-    WARNING: psVectorStats(): p_psVectorSampleMean() returned an error.
-<DATE><TIME>|<HOST>|W|psVectorStats
-    WARNING: psVectorStats(): p_psVectorSampleMean() returned an error.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Unallowable operation: psVector solution or its data is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Unallowable operation: kernels is NULL.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Error: x, -2.000000, is out of range.  Must be between -1.000000 and 1.000000.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Error: x, 2.000000, is out of range.  Must be between -1.000000 and 1.000000.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Error: y, -2.000000, is out of range.  Must be between -1.000000 and 1.000000.
-<DATE><TIME>|<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
+<HOST>|E|pmSubtractionKernelImage (FILE:LINENO)
     Error: y, 2.000000, is out of range.  Must be between -1.000000 and 1.000000.
 
Index: /trunk/psModules/test/verified/tst_pmImageSubtract.stdout
===================================================================
--- /trunk/psModules/test/verified/tst_pmImageSubtract.stdout	(revision 4578)
+++ /trunk/psModules/test/verified/tst_pmImageSubtract.stdout	(revision 4579)
@@ -2,8 +2,4 @@
 Testing pmSubtractionKernelsAllocPOIS(2, 3)
 Testing pmSubtractionKernelsAllocPOIS(3, 4)
-Testing pmSubtractionKernelsAllocISIS(1, 1, 1, 1)
-Testing pmSubtractionKernelsAllocISIS(2, 2, 2, 2)
-Testing pmSubtractionKernelsAllocISIS(2, 3, 4, 5)
-Testing pmSubtractionKernelsAllocISIS(3, 4, 5, 6)
 Testing pmSubtractionFindStamps(100, 100, 2, 2, 2)
 Calling with a NULL psImage.  Should generate error, return NULL.
@@ -21,6 +17,6 @@
 Calling with acceptable input parameters, NULL mask.
 Testing pmSubtractionCalculateEquation(): 
-    image size is (100, 100)
-    num stamps is (2, 2).  Border is 3
+    image size is (25, 25)
+    num stamps is (2, 2).  Border is 2
    kernel type is PM_SUBTRACTION_KERNEL_POIS.
 Generating stamps...
@@ -32,6 +28,8 @@
 Calling with acceptable input parameters.  Should return TRUE.
 Calling pmSubtractionSolveEquation() with a NULL stamp argument.  Should generate error, return FALSE.
-Calling with pmSubtractionSolveEquation() acceptable input parameters.  Should return non-NULL.
-Calling with pmSubtractionRejectStamps() acceptable input parameters.  Should return TRUE.
+Calling pmSubtractionSolveEquation() with acceptable input parameters.  Should return non-NULL.
+The solution vector is:
+(1.37) (-0.00) (0.10) (0.08) (0.14) (0.10) (0.01) (0.02) (0.00) (-0.02) (-0.01) (-0.00) (0.00) (0.01) (-0.00) (-0.01) (-0.00) (0.00) (0.02) (-0.01) (-0.01) (0.00) (0.00) (0.00) (-0.02) (0.01) (0.00) (-0.01) (0.00) (-0.00) (0.01) (-0.00) (-0.01) (0.00) (0.01) (0.01) (0.01) (0.01) (-0.00) (-0.01) (-0.00) (0.00) (0.00) (0.00) (0.01) (-0.00) (-0.00) (-0.01) (0.02) (-0.00) (0.00) (-0.00) (-0.00) (-0.01) (-0.01) (0.02) (0.01) (-0.01) (-0.00) (-0.00) (0.00) (0.00) (-0.00) (-0.00) (0.00) (-0.00) (-0.02) (0.01) (0.02) (-0.01) (-0.00) (-0.01) (-0.03) (-0.00) (0.04) (0.01) (-0.00) (-0.03) (0.02) (0.02) (0.01) (-0.03) (-0.03) (-0.02) (0.01) (-0.01) (-0.01) (0.00) (0.00) (0.01) (0.02) (-0.02) (-0.02) (0.02) (0.02) (0.02) (0.03) (-0.03) (-0.03) (0.02) (0.02) (0.02) (0.00) (0.01) (-0.02) (-0.01) (-0.01) (0.02) (-0.03) (0.02) (0.03) (-0.02) (-0.03) (-0.02) (-0.01) (-0.01) (0.00) (0.01) (-0.00) (-0.00) (-0.02) (0.01) (0.02) (-0.01) (-0.01) (-0.01) (-0.02) (0.02) (0.01) (-0.02) (-0.02) (-0.00) (0.02) (-0.01) (-0.02) (0.01) (0.00) (0.01) (-0.02) (0.01) (0.00) (-0.00) (-0.01) (0.00) (0.00) (-0.01) (-0.01) (0.01) (0.01) (0.01) (0.51) 
+Calling pmSubtractionRejectStamps() with acceptable input parameters.  Should return TRUE.
 Calling pmSubtractionKernelImage() with NULL solution.  Should generate error, return NULL.
 Calling pmSubtractionKernelImage() with NULL kernels.  Should generate error, return NULL.
@@ -40,8 +38,13 @@
 Calling pmSubtractionKernelImage() unallowable y value.  Should generate error, return NULL.
 Calling pmSubtractionKernelImage() unallowable y value.  Should generate error, return NULL.
-Calling with pmSubtractionKernelImage() acceptable input parameters.  Should return a psImage.
+Calling pmSubtractionKernelImage() with acceptable input parameters.  Should return a psImage.
+-0.000774 -0.013938 0.010689 -0.013394 -0.015507 
+-0.009241 -0.020300 -0.002732 0.016843 0.010743 
+0.008820 0.015628 1.495404 -0.021095 -0.009788 
+0.003371 -0.001256 0.017835 0.003308 0.008175 
+0.009877 -0.010686 0.014775 0.003368 0.006204 
 Testing pmSubtractionCalculateEquation(): 
-    image size is (100, 100)
-    num stamps is (2, 2).  Border is 3
+    image size is (25, 25)
+    num stamps is (2, 2).  Border is 2
    kernel type is PM_SUBTRACTION_KERNEL_ISIS.
 Generating stamps...
@@ -53,6 +56,8 @@
 Calling with acceptable input parameters.  Should return TRUE.
 Calling pmSubtractionSolveEquation() with a NULL stamp argument.  Should generate error, return FALSE.
-Calling with pmSubtractionSolveEquation() acceptable input parameters.  Should return non-NULL.
-Calling with pmSubtractionRejectStamps() acceptable input parameters.  Should return TRUE.
+Calling pmSubtractionSolveEquation() with acceptable input parameters.  Should return non-NULL.
+The solution vector is:
+(0.09) (-0.01) (-0.01) (0.00) (-0.00) (-0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.00) (0.55) 
+Calling pmSubtractionRejectStamps() with acceptable input parameters.  Should return TRUE.
 Calling pmSubtractionKernelImage() with NULL solution.  Should generate error, return NULL.
 Calling pmSubtractionKernelImage() with NULL kernels.  Should generate error, return NULL.
@@ -61,3 +66,8 @@
 Calling pmSubtractionKernelImage() unallowable y value.  Should generate error, return NULL.
 Calling pmSubtractionKernelImage() unallowable y value.  Should generate error, return NULL.
-Calling with pmSubtractionKernelImage() acceptable input parameters.  Should return a psImage.
+Calling pmSubtractionKernelImage() with acceptable input parameters.  Should return a psImage.
+0.031614 0.045997 0.052122 0.045997 0.031614 
+0.045997 0.066926 0.075837 0.066926 0.045997 
+0.052122 0.075837 0.085934 0.075837 0.052122 
+0.045997 0.066926 0.075837 0.066926 0.045997 
+0.031614 0.045997 0.052122 0.045997 0.031614 
