Index: /trunk/psModules/src/camera/pmFPAfileIO.c
===================================================================
--- /trunk/psModules/src/camera/pmFPAfileIO.c	(revision 12948)
+++ /trunk/psModules/src/camera/pmFPAfileIO.c	(revision 12949)
@@ -24,8 +24,10 @@
 #include "pmPeaks.h"
 #include "pmMoments.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmSource.h"
 #include "pmSourceIO.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmPSF.h"
 #include "pmPSF_IO.h"
Index: /trunk/psModules/src/objects/Makefile.am
===================================================================
--- /trunk/psModules/src/objects/Makefile.am	(revision 12948)
+++ /trunk/psModules/src/objects/Makefile.am	(revision 12949)
@@ -23,4 +23,5 @@
      pmSourcePlotPSFModel.c \
      pmSourcePlotMoments.c \
+     pmResiduals.c \
      pmPSF.c \
      pmPSF_IO.c \
@@ -46,4 +47,5 @@
      pmSourceIO.h \
      pmSourcePlots.h \
+     pmResiduals.h \
      pmPSF.h \
      pmPSF_IO.h \
Index: /trunk/psModules/src/objects/pmGrowthCurve.c
===================================================================
--- /trunk/psModules/src/objects/pmGrowthCurve.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmGrowthCurve.c	(revision 12949)
@@ -5,6 +5,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-30 21:12:56 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -22,4 +22,5 @@
 #include "pmPeaks.h"
 #include "pmMoments.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmSource.h"
Index: /trunk/psModules/src/objects/pmModel.c
===================================================================
--- /trunk/psModules/src/objects/pmModel.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmModel.c	(revision 12949)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-10-31 19:38:44 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -21,4 +21,5 @@
 #include <string.h>
 #include <pslib.h>
+#include "pmResiduals.h"
 #include "pmModel.h"
 
@@ -49,5 +50,7 @@
 {
     psTrace("psModules.objects", 3, "---- %s() begin ----\n", __func__);
+
     pmModel *tmp = (pmModel *) psAlloc(sizeof(pmModel));
+    psMemSetDeallocator(tmp, (psFreeFunc) modelFree);
 
     tmp->type = type;
@@ -57,4 +60,5 @@
     tmp->radiusFit = 0;
     tmp->status = PM_MODEL_UNTRIED;
+    tmp->residuals = NULL;		// XXX should the model own this memory?
 
     psS32 Nparams = pmModelParameterCount(type);
@@ -72,5 +76,4 @@
     }
 
-    psMemSetDeallocator(tmp, (psFreeFunc) modelFree);
     psTrace("psModules.objects", 3, "---- %s() end ----\n", __func__);
     return(tmp);
@@ -88,4 +91,7 @@
     new->status = model->status;
     new->radiusFit = model->radiusFit;
+
+    // XXX note that model->residuals is just a reference
+    new->residuals = model->residuals;
 
     for (int i = 0; i < new->params->n; i++) {
@@ -147,8 +153,37 @@
     psF32 skyValue = params->data.F32[0];
     psF32 pixelValue;
-
-    for (psS32 i = 0; i < image->numRows; i++) {
-        for (psS32 j = 0; j < image->numCols; j++) {
-            if ((mask != NULL) && mask->data.U8[i][j])
+    
+    float xCenter = model->params->data.F32[PM_PAR_XPOS];
+    float yCenter = model->params->data.F32[PM_PAR_YPOS];
+    float Io = model->params->data.F32[PM_PAR_I0];
+
+    int xBin = 1;
+    int yBin = 1;
+    float xResidCenter = 0.0;
+    float yResidCenter = 0.0;
+
+    psImageInterpolateOptions *Ro = NULL;
+    psImageInterpolateOptions *Rx = NULL;
+    psImageInterpolateOptions *Ry = NULL;
+    if (model->residuals) {
+	Ro = psImageInterpolateOptionsAlloc(
+	    PS_INTERPOLATE_BILINEAR,
+	    model->residuals->Ro, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0);
+	Rx = psImageInterpolateOptionsAlloc(
+	    PS_INTERPOLATE_BILINEAR,
+	    model->residuals->Rx, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0);
+	Ry = psImageInterpolateOptionsAlloc(
+	    PS_INTERPOLATE_BILINEAR,
+	    model->residuals->Ry, NULL, NULL, 0, 0.0, 0.0, 1, 0, 0.0);
+
+	xBin = model->residuals->xBin;
+	yBin = model->residuals->yBin;
+	xResidCenter = model->residuals->xCenter;
+	yResidCenter = model->residuals->yCenter;
+    }
+
+    for (psS32 iy = 0; iy < image->numRows; iy++) {
+        for (psS32 ix = 0; ix < image->numCols; ix++) {
+            if ((mask != NULL) && mask->data.U8[iy][ix])
                 continue;
 
@@ -156,9 +191,9 @@
             // 'center' option changes meaning of i,j:
             if (center) {
-                imageCol = j - 0.5*image->numCols + model->params->data.F32[2];
-                imageRow = i - 0.5*image->numRows + model->params->data.F32[3];
+                imageCol = ix - 0.5*image->numCols + xCenter;
+                imageRow = iy - 0.5*image->numRows + yCenter;
             } else {
-                imageCol = j + image->col0;
-                imageRow = i + image->row0;
+                imageCol = ix + image->col0;
+                imageRow = iy + image->row0;
             }
 
@@ -173,16 +208,38 @@
             }
 
+	    // get the contribution from the residual model
+	    // XXX for a test, do this for all sources and all pixels
+	    if (Ro) {
+		// fractional image position
+		// this is wrong for the 'center' case
+		float ox = xBin*(ix + 0.5 + image->col0 - xCenter) + xResidCenter;
+		float oy = yBin*(iy + 0.5 + image->row0 - yCenter) + yResidCenter;
+
+		psU8 mflux = 0;
+		double Fo = 0.0;
+		double Fx = 0.0;
+		double Fy = 0.0;
+		psImageInterpolate (&Fo, NULL, &mflux, ox, oy, Ro);
+		psImageInterpolate (&Fx, NULL, &mflux, ox, oy, Rx);
+		psImageInterpolate (&Fy, NULL, &mflux, ox, oy, Ry);
+
+		if (!mflux && isfinite(Fo) && isfinite(Fx) && isfinite(Fy)) {
+		    double flux = Fo + xCenter*Fx + yCenter*Fy;
+		    pixelValue += Io*flux;
+		}
+	    }
 
             // add or subtract the value
-            if (add
-               ) {
-                image->data.F32[i][j] += pixelValue;
-            }
-            else {
-                image->data.F32[i][j] -= pixelValue;
+            if (add) {
+                image->data.F32[iy][ix] += pixelValue;
+            } else {
+                image->data.F32[iy][ix] -= pixelValue;
             }
         }
     }
     psFree(x);
+    psFree(Ro);
+    psFree(Rx);
+    psFree(Ry);
     psTrace("psModules.objects", 3, "---- %s(true) end ----\n", __func__);
     return(true);
Index: /trunk/psModules/src/objects/pmModel.h
===================================================================
--- /trunk/psModules/src/objects/pmModel.h	(revision 12948)
+++ /trunk/psModules/src/objects/pmModel.h	(revision 12949)
@@ -5,6 +5,6 @@
  * @author EAM, IfA
  *
- * @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-01-24 02:54:15 $
+ * @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-04-21 19:47:14 $
  * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
@@ -38,15 +38,21 @@
 typedef struct
 {
-    pmModelType type;   ///< Model to be used.
-    psVector *params;   ///< Paramater values.
-    psVector *dparams;   ///< Parameter errors.
-    float chisq;   ///< Fit chi-squared.
-    float chisqNorm;   ///< re-normalized fit chi-squared.
-    int nDOF;    ///< number of degrees of freedom
-    int nIter;    ///< number of iterations to reach min
-    pmModelStatus status;  ///< fit status
-    float radiusFit;   ///< fit radius actually used
+    pmModelType type;			///< Model to be used.
+    psVector *params;			///< Paramater values.
+    psVector *dparams;			///< Parameter errors.
+    float chisq;			///< Fit chi-squared.
+    float chisqNorm;			///< re-normalized fit chi-squared.
+    int nDOF;				///< number of degrees of freedom
+    int nIter;				///< number of iterations to reach min
+    pmModelStatus status;		///< fit status
+    float radiusFit;			///< fit radius actually used
+    pmResiduals *residuals; 		///< normalized PSF residuals 
 }
 pmModel;
+
+/* XXX we are currently saving the residuals with the pmModel.  It might be better to save this
+ * in the pmSource.  we may want an API to Add/Sub a pmModel (analytical model only) or a
+ * pmSource (analytical + residuals).
+ */
 
 /** Symbolic names for the elements of [d]params
Index: /trunk/psModules/src/objects/pmModelGroup.c
===================================================================
--- /trunk/psModules/src/objects/pmModelGroup.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmModelGroup.c	(revision 12949)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-11-29 02:35:45 $
+ *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,5 +26,7 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
+#include "pmResiduals.h"
 #include "pmPSF.h"
 #include "pmSource.h"
Index: /trunk/psModules/src/objects/pmPSF.c
===================================================================
--- /trunk/psModules/src/objects/pmPSF.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmPSF.c	(revision 12949)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-04-12 18:56:37 $
+ *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -27,4 +27,5 @@
 #include "pmPeaks.h"
 #include "pmMoments.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmSource.h"
@@ -73,4 +74,5 @@
     psFree (psf->growth);
     psFree (psf->params_NEW);
+    psFree (psf->residuals);
     return;
 }
@@ -117,4 +119,7 @@
     // don't define a growth curve : user needs to choose radius bins
     psf->growth = NULL;
+
+    // by default, we do not construct the residual image
+    psf->residuals = NULL;
 
     Nparams = pmModelParameterCount (type);
Index: /trunk/psModules/src/objects/pmPSF.h
===================================================================
--- /trunk/psModules/src/objects/pmPSF.h	(revision 12948)
+++ /trunk/psModules/src/objects/pmPSF.h	(revision 12949)
@@ -6,6 +6,6 @@
  * @author EAM, IfA
  *
- * @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- * @date $Date: 2007-01-24 02:54:15 $
+ * @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-04-21 19:47:14 $
  * Copyright 2004 Maui High Performance Computing Center, University of Hawaii
  */
@@ -49,16 +49,16 @@
     // unfitted elements (So, Io, Xo, Yo) and leave them as NULL
     // I am using a new name to catch all refs to params with gcc
-    psPolynomial1D *ChiTrend;  ///< Chisq vs flux fit (correction for systematic errors)
-    psPolynomial4D *ApTrend;  ///< ApResid vs (x,y,rflux) (rflux = ten(0.4*mInst))
-    //pmGrowthCurve *growth;  ///< apMag vs Radius // move to end as gdb is confused by it here
-    float ApResid;   ///< apMag - psfMag (for PSF stars)
-    float dApResid;   ///< scatter of ApResid
-    float skyBias;   ///< implied residual sky offset from ApResid fit
-    float skySat;   ///< roll-over of ApResid fit
-    float chisq;   ///< PSF goodness statistic (unused??)
-    int nPSFstars;   ///< number of stars used to measure PSF
-    int nApResid;   ///< number of stars used to measure ApResid
+    psPolynomial1D *ChiTrend;	      ///< Chisq vs flux fit (correction for systematic errors)
+    psPolynomial4D *ApTrend;		///< ApResid vs (x,y,rflux) (rflux = ten(0.4*mInst))
+    float ApResid;			///< apMag - psfMag (for PSF stars)
+    float dApResid;			///< scatter of ApResid
+    float skyBias;			///< implied residual sky offset from ApResid fit
+    float skySat;			///< roll-over of ApResid fit
+    float chisq;			///< PSF goodness statistic (unused??)
+    int nPSFstars;			///< number of stars used to measure PSF
+    int nApResid;			///< number of stars used to measure ApResid
     bool poissonErrors;
-    pmGrowthCurve *growth;  ///< apMag vs Radius
+    pmGrowthCurve *growth;		///< apMag vs Radius
+    pmResiduals *residuals;		///< normalized residual image (no spatial variation)
 }
 pmPSF;
Index: /trunk/psModules/src/objects/pmPSF_IO.c
===================================================================
--- /trunk/psModules/src/objects/pmPSF_IO.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmPSF_IO.c	(revision 12949)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-04-14 03:22:48 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -36,4 +36,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmPSFtry.c
===================================================================
--- /trunk/psModules/src/objects/pmPSFtry.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmPSFtry.c	(revision 12949)
@@ -5,6 +5,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.34 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-01-19 04:35:53 $
+ *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -22,4 +22,5 @@
 #include "pmPeaks.h"
 #include "pmMoments.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmSource.h"
Index: /trunk/psModules/src/objects/pmResiduals.c
===================================================================
--- /trunk/psModules/src/objects/pmResiduals.c	(revision 12949)
+++ /trunk/psModules/src/objects/pmResiduals.c	(revision 12949)
@@ -0,0 +1,52 @@
+/** @file pmResiduals.c
+ *
+ * Functions to manipulate the residual tables (data - model).
+ *
+ * @author EAM, IfA
+ * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-04-21 19:47:14 $
+ * Copyright 2004 IfA, University of Hawaii
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <pslib.h>
+#include "pmResiduals.h"
+
+static void pmResidualsFree (pmResiduals *resid) {
+
+    if (resid == NULL) return;
+
+    psFree (resid->Ro);
+    psFree (resid->Rx);
+    psFree (resid->Ry);
+    psFree (resid->weight);
+    psFree (resid->mask);
+    return;
+}
+
+pmResiduals *pmResidualsAlloc (int xSize, int ySize, int xBin, int yBin) {
+
+    pmResiduals *resid = (pmResiduals *) psAlloc(sizeof(pmResiduals));
+    psMemSetDeallocator(resid, (psFreeFunc) pmResidualsFree);
+
+    int nX = xSize * xBin;
+    int nY = ySize * yBin;
+
+    nX = (nX % 2) ? nX : nX + 1;
+    nY = (nY % 2) ? nY : nY + 1;
+
+    resid->Ro  = psImageAlloc (nX, nY, PS_TYPE_F32);
+    resid->Rx  = psImageAlloc (nX, nY, PS_TYPE_F32);
+    resid->Ry  = psImageAlloc (nX, nY, PS_TYPE_F32);
+    resid->weight = psImageAlloc (nX, nY, PS_TYPE_F32);
+    resid->mask   = psImageAlloc (nX, nY, PS_TYPE_U8);
+
+    resid->xBin = xBin;
+    resid->yBin = yBin;
+    resid->xCenter = 0.5*(nX - 1); 
+    resid->yCenter = 0.5*(nY - 1);
+    return resid;
+}
Index: /trunk/psModules/src/objects/pmResiduals.h
===================================================================
--- /trunk/psModules/src/objects/pmResiduals.h	(revision 12949)
+++ /trunk/psModules/src/objects/pmResiduals.h	(revision 12949)
@@ -0,0 +1,33 @@
+/** @file pmResiduals.h
+ *
+ * Functions to manipulate the residual tables (data - model).
+ *
+ * @author EAM, IfA
+ * @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ * @date $Date: 2007-04-21 19:47:14 $
+ * Copyright 2004 IfA, University of Hawaii
+ */
+
+# ifndef PM_RESIDUALS_H
+# define PM_RESIDUALS_H
+/// @addtogroup Objects Object Detection / Analysis Functions
+/// @{
+
+/** residual tables for sources 
+ */
+typedef struct {
+    psImage *Ro;
+    psImage *Rx;
+    psImage *Ry;
+    psImage *weight;
+    psImage *mask;
+    int xBin;
+    int yBin;
+    int xCenter;
+    int yCenter;
+} pmResiduals;
+
+pmResiduals *pmResidualsAlloc (int xSize, int ySize, int xBin, int yBin);
+
+/// @}
+# endif
Index: /trunk/psModules/src/objects/pmSource.c
===================================================================
--- /trunk/psModules/src/objects/pmSource.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSource.c	(revision 12949)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-02-13 03:14:42 $
+ *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,4 +26,5 @@
 #include "pmPeaks.h"
 #include "pmMoments.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmSource.h"
Index: /trunk/psModules/src/objects/pmSourceContour.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceContour.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceContour.c	(revision 12949)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-10-24 22:55:05 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -25,4 +25,5 @@
 #include "pmPeaks.h"
 #include "pmMoments.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmSource.h"
Index: /trunk/psModules/src/objects/pmSourceFitModel.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceFitModel.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceFitModel.c	(revision 12949)
@@ -6,6 +6,6 @@
  *  @author GLG, MHPCC
  *
- *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-02-07 23:58:17 $
+ *  @version $Revision: 1.20 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,4 +26,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourceIO.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceIO.c	(revision 12949)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.35 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-04-18 19:42:37 $
+ *  @version $Revision: 1.36 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -33,4 +33,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourceIO_CMF.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO_CMF.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceIO_CMF.c	(revision 12949)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-30 21:12:56 $
+ *  @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -27,4 +27,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourceIO_CMP.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO_CMP.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceIO_CMP.c	(revision 12949)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.25 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-04-18 19:40:57 $
+ *  @version $Revision: 1.26 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,4 +31,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourceIO_OBJ.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO_OBJ.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceIO_OBJ.c	(revision 12949)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-30 21:12:56 $
+ *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,4 +31,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourceIO_PS1_DEV_0.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO_PS1_DEV_0.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceIO_PS1_DEV_0.c	(revision 12949)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-31 03:02:05 $
+ *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,4 +31,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourceIO_RAW.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO_RAW.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceIO_RAW.c	(revision 12949)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-30 21:12:56 $
+ *  @version $Revision: 1.15 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,4 +31,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourceIO_SMPDATA.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO_SMPDATA.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceIO_SMPDATA.c	(revision 12949)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-04-18 19:36:01 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,4 +31,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourceIO_SX.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceIO_SX.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceIO_SX.c	(revision 12949)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-03-30 21:12:56 $
+ *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,4 +31,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourcePhotometry.c
===================================================================
--- /trunk/psModules/src/objects/pmSourcePhotometry.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourcePhotometry.c	(revision 12949)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA; GLG, MHPCC
  *
- *  @version $Revision: 1.22 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-02-07 23:58:17 $
+ *  @version $Revision: 1.23 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -24,4 +24,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourcePlotMoments.c
===================================================================
--- /trunk/psModules/src/objects/pmSourcePlotMoments.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourcePlotMoments.c	(revision 12949)
@@ -5,6 +5,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-04-14 03:22:48 $
+ *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2006 IfA, University of Hawaii
@@ -31,4 +31,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourcePlotPSFModel.c
===================================================================
--- /trunk/psModules/src/objects/pmSourcePlotPSFModel.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourcePlotPSFModel.c	(revision 12949)
@@ -5,6 +5,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.5 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-04-14 03:22:48 $
+ *  @version $Revision: 1.6 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2006 IfA, University of Hawaii
@@ -31,4 +31,5 @@
 #include "pmMoments.h"
 #include "pmGrowthCurve.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmPSF.h"
Index: /trunk/psModules/src/objects/pmSourceSky.c
===================================================================
--- /trunk/psModules/src/objects/pmSourceSky.c	(revision 12948)
+++ /trunk/psModules/src/objects/pmSourceSky.c	(revision 12949)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2007-02-13 03:14:42 $
+ *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2007-04-21 19:47:14 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -26,4 +26,5 @@
 #include "pmPeaks.h"
 #include "pmMoments.h"
+#include "pmResiduals.h"
 #include "pmModel.h"
 #include "pmSource.h"
Index: /trunk/psModules/src/psmodules.h
===================================================================
--- /trunk/psModules/src/psmodules.h	(revision 12948)
+++ /trunk/psModules/src/psmodules.h	(revision 12949)
@@ -73,4 +73,5 @@
 #include <pmPeaks.h>
 #include <pmMoments.h>
+#include <pmResiduals.h>
 #include <pmModel.h>
 #include <pmSource.h>
