Index: trunk/psphot/src/pmPSFtry.c
===================================================================
--- trunk/psphot/src/pmPSFtry.c	(revision 5134)
+++ trunk/psphot/src/pmPSFtry.c	(revision 5593)
@@ -265,17 +265,10 @@
   }
 
-  // linear fit to rfBin, daBin
-  psPolynomial1D *poly = Polynomial1DAlloc_EAM (PS_POLYNOMIAL_ORD, 1);
-
-  // XXX EAM : this is the intended API (cycle 7? cycle 8?) 
+  // linear clipped fit to rfBin, daBin
+  psPolynomial1D *poly = psPolynomial1DAlloc (1, PS_POLYNOMIAL_ORD);
   psStats *fitstat = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV);
-  poly = VectorClipFitPolynomial1D_EAM (poly, fitstat, maskB, 1, daBin, NULL, rfBin);
-
-  // poly = VectorFitPolynomial1D_EAM (poly, maskB, 1, daBin, NULL, rfBin);
-
-  // XXX EAM : replace this when the above version is implemented
-  // poly = VectorFitPolynomial1DOrd_EAM (poly, maskB, rfBin, daBin, NULL);
-
-  psVector *daBinFit = Polynomial1DEvalVector_EAM (poly, rfBin);
+  poly = psVectorClipFitPolynomial1D (poly, fitstat, maskB, 1, daBin, NULL, rfBin);
+
+  psVector *daBinFit = psPolynomial1DEvalVector (poly, rfBin);
   psVector *daResid  = (psVector *) psBinaryOp (NULL, (void *) daBin, "-", (void *) daBinFit);
 
@@ -326,21 +319,8 @@
   stats->clipIter = 3;
 
-  // linear fit to rfBin, daBin
-  psPolynomial1D *poly = Polynomial1DAlloc_EAM (PS_POLYNOMIAL_ORD, 1);
-
-  // XXX EAM : this is the intended API (cycle 7? cycle 8?) 
-  poly = VectorClipFitPolynomial1D_EAM (poly, stats, try->mask, PSFTRY_MASK_ALL, try->metric, NULL, rflux);
-
+  // linear clipped fit to rfBin, daBin
+  psPolynomial1D *poly = psPolynomial1DAlloc (1, PS_POLYNOMIAL_ORD);
+  poly = psVectorClipFitPolynomial1D (poly, stats, try->mask, PSFTRY_MASK_ALL, try->metric, NULL, rflux);
   fprintf (stderr, "fit stats: %f +/- %f\n", stats->sampleMedian, stats->sampleStdev);
-
-  // these stats should come back from the fit above...
-  // psVector *daFit   = Polynomial1DEvalVector_EAM (poly, rflux);
-  // psVector *daResid = (psVector *) psBinaryOp (NULL, (void *) try->metric, "-", (void *) daFit);
-
-  // stats = psStatsAlloc (PS_STAT_CLIPPED_STDEV);
-  // stats->clipIter = 3;
-  // stats->clipSigma = 3;
-
-  // stats = psVectorStats (stats, daResid, NULL, maskB, 1);
 
   try->psf->ApResid = poly->coeff[0];
