IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Nov 25, 2005, 1:13:43 PM (21 years ago)
Author:
eugene
Message:

updated to use psLib.v8, dropping _EAM code everywhere

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/psphot/src/pmPSFtry.c

    r5134 r5593  
    265265  }
    266266
    267   // linear fit to rfBin, daBin
    268   psPolynomial1D *poly = Polynomial1DAlloc_EAM (PS_POLYNOMIAL_ORD, 1);
    269 
    270   // XXX EAM : this is the intended API (cycle 7? cycle 8?)
     267  // linear clipped fit to rfBin, daBin
     268  psPolynomial1D *poly = psPolynomial1DAlloc (1, PS_POLYNOMIAL_ORD);
    271269  psStats *fitstat = psStatsAlloc (PS_STAT_SAMPLE_MEDIAN | PS_STAT_SAMPLE_STDEV);
    272   poly = VectorClipFitPolynomial1D_EAM (poly, fitstat, maskB, 1, daBin, NULL, rfBin);
    273 
    274   // poly = VectorFitPolynomial1D_EAM (poly, maskB, 1, daBin, NULL, rfBin);
    275 
    276   // XXX EAM : replace this when the above version is implemented
    277   // poly = VectorFitPolynomial1DOrd_EAM (poly, maskB, rfBin, daBin, NULL);
    278 
    279   psVector *daBinFit = Polynomial1DEvalVector_EAM (poly, rfBin);
     270  poly = psVectorClipFitPolynomial1D (poly, fitstat, maskB, 1, daBin, NULL, rfBin);
     271
     272  psVector *daBinFit = psPolynomial1DEvalVector (poly, rfBin);
    280273  psVector *daResid  = (psVector *) psBinaryOp (NULL, (void *) daBin, "-", (void *) daBinFit);
    281274
     
    326319  stats->clipIter = 3;
    327320
    328   // linear fit to rfBin, daBin
    329   psPolynomial1D *poly = Polynomial1DAlloc_EAM (PS_POLYNOMIAL_ORD, 1);
    330 
    331   // XXX EAM : this is the intended API (cycle 7? cycle 8?)
    332   poly = VectorClipFitPolynomial1D_EAM (poly, stats, try->mask, PSFTRY_MASK_ALL, try->metric, NULL, rflux);
    333 
     321  // linear clipped fit to rfBin, daBin
     322  psPolynomial1D *poly = psPolynomial1DAlloc (1, PS_POLYNOMIAL_ORD);
     323  poly = psVectorClipFitPolynomial1D (poly, stats, try->mask, PSFTRY_MASK_ALL, try->metric, NULL, rflux);
    334324  fprintf (stderr, "fit stats: %f +/- %f\n", stats->sampleMedian, stats->sampleStdev);
    335 
    336   // these stats should come back from the fit above...
    337   // psVector *daFit   = Polynomial1DEvalVector_EAM (poly, rflux);
    338   // psVector *daResid = (psVector *) psBinaryOp (NULL, (void *) try->metric, "-", (void *) daFit);
    339 
    340   // stats = psStatsAlloc (PS_STAT_CLIPPED_STDEV);
    341   // stats->clipIter = 3;
    342   // stats->clipSigma = 3;
    343 
    344   // stats = psVectorStats (stats, daResid, NULL, maskB, 1);
    345325
    346326  try->psf->ApResid = poly->coeff[0];
Note: See TracChangeset for help on using the changeset viewer.