Index: /branches/eam_branch_20080324/psphot/src/psphotPSFConvModel.c
===================================================================
--- /branches/eam_branch_20080324/psphot/src/psphotPSFConvModel.c	(revision 17342)
+++ /branches/eam_branch_20080324/psphot/src/psphotPSFConvModel.c	(revision 17343)
@@ -1,3 +1,3 @@
-# include "psphot.h"
+# include "psphotInternal.h"
 
 // save as static values so they may be set externally
@@ -10,6 +10,4 @@
 pmModel *psphotPSFConvModel (pmReadout *readout, pmSource *source, pmModelType modelType, psMaskType maskVal, int psfSize) {
     
-    bool status;
-
     // make sure we save a cached copy of the psf flux
     pmSourceCachePSF (source, maskVal);
@@ -32,5 +30,5 @@
     }
 
-# define USE_DELTA_PSF 0
+# define USE_DELTA_PSF 1
 # if (USE_DELTA_PSF)
     // XXX sanity check: convolve with delta function should behave like unconvolved version
@@ -40,5 +38,5 @@
 	}
     }
-    psf->image->data.F32[2][2] = 1.0;
+    psf->image->data.F32[(int)(0.5*psf->image->numRows)][(int)(0.5*psf->image->numCols)] = 1.0;
 # endif
 
@@ -120,4 +118,5 @@
     source->mode |= PM_SOURCE_MODE_FITTED; // XXX is this needed?
 
+    psFree(psf);
     psFree(myMin);
     psFree(covar);
