Index: /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c
===================================================================
--- /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c	(revision 29458)
+++ /branches/eam_branches/ipp-20100823/psphot/src/psphotSourceSize.c	(revision 29459)
@@ -219,14 +219,15 @@
 
     // model the distribution as a mean or median value and a systematic error from that value:
-    psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN);
+    // psStats *stats = psStatsAlloc(PS_STAT_ROBUST_MEDIAN);    
+    psStats *stats = psStatsAlloc(PS_STAT_CLIPPED_MEAN);    
     psVectorStats (stats, Ap, NULL, NULL, 0);
 
     psVector *dAp = psVectorAlloc (Ap->n, PS_TYPE_F32);
     for (int i = 0; i < Ap->n; i++) {
-        dAp->data.F32[i] = Ap->data.F32[i] - stats->robustMedian;
-    }
-
-    options->ApResid = stats->robustMedian;
-    options->ApSysErr = psVectorSystematicError(dAp, ApErr, 0.05);
+        dAp->data.F32[i] = Ap->data.F32[i] - stats->clippedMean;
+    }
+
+    options->ApResid = stats->clippedMean;
+    options->ApSysErr = psVectorSystematicError(dAp, ApErr, 0.1);
     // XXX this is quite arbitrary...
     if (!isfinite(options->ApSysErr)) options->ApSysErr = 0.01;
@@ -361,4 +362,5 @@
 
         // set nSigma to include both systematic and poisson error terms
+	// XXX need to handle NAN psfMag and apMag (ie, skip?)
         // XXX the 'poisson error' contribution for size is probably wrong...
 	// XXX add in a hard floor on the Ap Sys Err (to be a bit generous)
