Index: trunk/psphot/src/pmObjects_EAM.c
===================================================================
--- trunk/psphot/src/pmObjects_EAM.c	(revision 5351)
+++ trunk/psphot/src/pmObjects_EAM.c	(revision 5593)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA: significant modifications.
  *
- *  @version $Revision: 1.10 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2005-10-17 19:04:33 $
+ *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2005-11-25 23:13:43 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -999,5 +999,5 @@
     int Ncr    	 = 0;
     int Nsatstar = 0;
-    // psRegion allArray;
+    psRegion allArray = psRegionSet (0, 0, 0, 0);
 
     psVector *starsn = psVectorAlloc (sources->n, PS_TYPE_F32);
@@ -1031,8 +1031,6 @@
 
 	// XXX EAM : can we use the value of SATURATE if mask is NULL?
-	// XXX EAM *** serious errors in psImageCountPixelMask: inconsistent with psRegion and subimage
-	// allArray = psRegionSet (1, tmpSrc->mask->numCols, 1, tmpSrc->mask->numRows);
-	// int Nsatpix = psImageCountPixelMask (tmpSrc->mask, allArray, PSPHOT_MASK_SATURATED);
-	int Nsatpix = psImageCountPixelMask_EAM (tmpSrc->mask, PSPHOT_MASK_SATURATED);
+	// allArray = psRegionSet (0, 0, 0, 0);
+	int Nsatpix = psImageCountPixelMask (tmpSrc->mask, allArray, PSPHOT_MASK_SATURATED);
 
         // saturated star (size consistent with PSF or larger)
@@ -1648,5 +1646,5 @@
 		Ro = 1.0 + fabs (y->data.F32[tmpCnt] - ymodel) / sqrt(PS_SQR(ymodel - So) + PS_SQR(So));
 
-		// psMinimizeLMChi2_EAM takes wt = 1/dY^2
+		// psMinimizeLMChi2 takes wt = 1/dY^2
 		if (source->weight->data.F32[i][j] == 0) {
 		  yErr->data.F32[tmpCnt] = 0.0;
@@ -1701,10 +1699,10 @@
 
     psTrace (".pmObjects.pmSourceFitModel", 5, "fitting function\n");
-    fitStatus = psMinimizeLMChi2_EAM(myMin, covar, params, paramMask, x, y, yErr, modelFunc);
+
+    fitStatus = psMinimizeLMChi2 (myMin, covar, params, paramMask, x, y, yErr, modelFunc);
     for (int i = 0; i < dparams->n; i++) {
 	if ((paramMask != NULL) && paramMask->data.U8[i]) continue;
 	dparams->data.F32[i] = sqrt(covar->data.F64[i][i]);
     }
- 
     // XXX EAM: we need to do something (give an error?) if rc is false
     // XXX EAM: psMinimizeLMChi2 does not check convergence
@@ -1724,5 +1722,5 @@
     if (paramMask != NULL) {
 	psVector *delta = psVectorAlloc (params->n, PS_TYPE_F64);
-	psMinimizeGaussNewtonDelta_EAM (delta, params, NULL, x, y, yErr, modelFunc);
+	psMinimizeGaussNewtonDelta (delta, params, NULL, x, y, yErr, modelFunc);
 	for (int i = 0; i < dparams->n; i++) {
 	    if (!paramMask->data.U8[i]) continue;
