Index: trunk/psModules/src/objects/pmPSFtry.c
===================================================================
--- trunk/psModules/src/objects/pmPSFtry.c	(revision 20453)
+++ trunk/psModules/src/objects/pmPSFtry.c	(revision 20582)
@@ -5,6 +5,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.65 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2008-10-29 01:04:27 $
+ *  @version $Revision: 1.66 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2008-11-08 01:52:34 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -34,4 +34,5 @@
 #include "pmSourceFitModel.h"
 #include "pmSourcePhotometry.h"
+#include "pmSourceVisual.h"
 
 bool printTrendMap (pmTrend2D *trend) {
@@ -683,4 +684,5 @@
 	    stdev = psStatsGetValue (trend->stats, stdevOption);
             psTrace ("psModules.objects", 4, "clipped E0 : %f +/- %f keeping %ld of %ld\n", mean, stdev, psf->psfTrendStats->clippedNvalues, e0->n);
+	    pmSourceVisualPSFModelResid (trend, x, y, e0, srcMask);
 
 	    trend = psf->params->data[PM_PAR_E1];
@@ -689,4 +691,5 @@
 	    stdev = psStatsGetValue (trend->stats, stdevOption);
             psTrace ("psModules.objects", 4, "clipped E1 : %f +/- %f keeping %ld of %ld\n", mean, stdev, psf->psfTrendStats->clippedNvalues, e1->n);
+	    pmSourceVisualPSFModelResid (trend, x, y, e1, srcMask);
 
 	    trend = psf->params->data[PM_PAR_E2];
@@ -695,4 +698,5 @@
 	    stdev = psStatsGetValue (trend->stats, stdevOption);
             psTrace ("psModules.objects", 4, "clipped E2 : %f +/- %f keeping %ld of %ld\n", mean, stdev, psf->psfTrendStats->clippedNvalues, e2->n);
+	    pmSourceVisualPSFModelResid (trend, x, y, e2, srcMask);
 
             if (!status) {
@@ -853,4 +857,5 @@
 	psImageMapCleanup (trend->map);
 	// printTrendMap (trend);
+	pmSourceVisualPSFModelResid (trend, x, y, e0obs, mask);
 
 	trend = psf->params->data[PM_PAR_E1];
@@ -862,4 +867,5 @@
 	psImageMapCleanup (trend->map);
 	// printTrendMap (trend);
+	pmSourceVisualPSFModelResid (trend, x, y, e1obs, mask);
 
 	trend = psf->params->data[PM_PAR_E2];
@@ -871,4 +877,5 @@
 	psImageMapCleanup (trend->map);
 	// printTrendMap (trend);
+	pmSourceVisualPSFModelResid (trend, x, y, e2obs, mask);
     }
     psf->psfTrendStats->clipIter = nIter; // restore default setting
