IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 29017


Ignore:
Timestamp:
Aug 23, 2010, 1:54:55 PM (16 years ago)
Author:
eugene
Message:

remove unneeded fprintfs; do not fail on missing MIN,MAX_TOL values

Location:
trunk/psphot/src
Files:
3 edited

Legend:

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

    r29004 r29017  
    6666
    6767    float fitMinTol = psMetadataLookupF32 (&status, recipe, "EXT_FIT_MIN_TOL"); // Fit tolerance
    68     assert (status && isfinite(fitMinTol) && fitMinTol > 0);
     68    if (!status || !isfinite(fitMinTol) || fitMinTol <= 0) {
     69        fitMinTol = psMetadataLookupF32 (&status, recipe, "PSF_FIT_TOL"); // Fit tolerance
     70        if (!status || !isfinite(fitMinTol) || fitMinTol <= 0) {
     71            psAbort("PSF_FIT_MIN_TOL (and PSF_FIT_TOL) not defined or positive");
     72        }
     73    }
    6974
    7075    float fitMaxTol = psMetadataLookupF32 (&status, recipe, "EXT_FIT_MAX_TOL"); // Fit tolerance
    71     assert (status && isfinite(fitMaxTol) && fitMaxTol > 0);
     76    if (!status || !isfinite(fitMaxTol) || fitMaxTol <= 0) {
     77        fitMaxTol = 1.0;
     78    }
    7279
    7380    bool poisson = psMetadataLookupBool(&status, recipe, "POISSON.ERRORS.PHOT.LMM"); // Poisson errors?
  • trunk/psphot/src/psphotSourceFits.c

    r29015 r29017  
    506506    // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5);
    507507    pmSourceFitModel (source, model, &options, maskVal);
    508     fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix);
     508    // fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix);
    509509
    510510    // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 0);
     
    570570    // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5);
    571571    pmSourceFitPCM (pcm, source, &options, maskVal, markVal, psfSize);
    572     fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix);
     572    // fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix);
    573573
    574574    // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 0);
     
    613613       
    614614        pmSourceFitModel (source, model, &options, maskVal);
    615         fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix);
     615        // fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix);
    616616
    617617        chiSquare[i] = model->chisqNorm;
     
    681681        pmSourceFitPCM (pcm, source, &options, maskVal, markVal, psfSize);
    682682# endif
    683         fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix);
     683        // fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix);
    684684
    685685        chiSquare[i] = model->chisq;
  • trunk/psphot/src/psphotSourceSize.c

    r29004 r29017  
    366366        float nSigmaMYY = (Myy - psfClump->Y) / hypot(psfClump->dY, psfClump->Y*psfClump->Y*source->errMag);
    367367
    368         fprintf (stderr, "%f %f : Mxx: %f, Myy: %f, dx: %f, dy: %f, psfMag: %f, apMag: %f, dMag: %f, errMag: %f, nSigmaMag: %f, nSigmaMxx: %f, nSigmaMyy: %f\n",
    369                 source->peak->xf, source->peak->yf, Mxx, Myy, source->peak->xf - source->moments->Mx, source->peak->yf - source->moments->My,
    370                 source->psfMag, apMag, dMag, source->errMag, nSigmaMAG, nSigmaMXX, nSigmaMYY);
     368        // fprintf (stderr, "%f %f : Mxx: %f, Myy: %f, dx: %f, dy: %f, psfMag: %f, apMag: %f, dMag: %f, errMag: %f, nSigmaMag: %f, nSigmaMxx: %f, nSigmaMyy: %f\n",
     369        // source->peak->xf, source->peak->yf, Mxx, Myy, source->peak->xf - source->moments->Mx, source->peak->yf - source->moments->My,
     370        // source->psfMag, apMag, dMag, source->errMag, nSigmaMAG, nSigmaMXX, nSigmaMYY);
    371371
    372372        // XXX double check on ths stuff!! partially-masked sources are more likely to be mis-measured PSFs
Note: See TracChangeset for help on using the changeset viewer.