Changeset 29017
- Timestamp:
- Aug 23, 2010, 1:54:55 PM (16 years ago)
- Location:
- trunk/psphot/src
- Files:
-
- 3 edited
-
psphotBlendFit.c (modified) (1 diff)
-
psphotSourceFits.c (modified) (4 diffs)
-
psphotSourceSize.c (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/psphot/src/psphotBlendFit.c
r29004 r29017 66 66 67 67 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 } 69 74 70 75 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 } 72 79 73 80 bool poisson = psMetadataLookupBool(&status, recipe, "POISSON.ERRORS.PHOT.LMM"); // Poisson errors? -
trunk/psphot/src/psphotSourceFits.c
r29015 r29017 506 506 // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5); 507 507 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); 509 509 510 510 // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 0); … … 570 570 // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5); 571 571 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); 573 573 574 574 // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 0); … … 613 613 614 614 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); 616 616 617 617 chiSquare[i] = model->chisqNorm; … … 681 681 pmSourceFitPCM (pcm, source, &options, maskVal, markVal, psfSize); 682 682 # 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); 684 684 685 685 chiSquare[i] = model->chisq; -
trunk/psphot/src/psphotSourceSize.c
r29004 r29017 366 366 float nSigmaMYY = (Myy - psfClump->Y) / hypot(psfClump->dY, psfClump->Y*psfClump->Y*source->errMag); 367 367 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); 371 371 372 372 // 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.
