Changeset 34146 for branches/eam_branches/ipp-20120627/psphot
- Timestamp:
- Jul 13, 2012, 6:35:58 AM (14 years ago)
- Location:
- branches/eam_branches/ipp-20120627/psphot/src
- Files:
-
- 2 edited
-
psphotBlendFit.c (modified) (1 diff)
-
psphotSourceFits.c (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20120627/psphot/src/psphotBlendFit.c
r33089 r34146 61 61 if (!status) { 62 62 nThreads = 0; 63 } 64 65 // do not thread if we are trying to study the fitting process 66 if (psTraceGetLevel ("psphot.psphotFitEXT") >= 6) { 67 nThreads = 0; 63 68 } 64 69 -
branches/eam_branches/ipp-20120627/psphot/src/psphotSourceFits.c
r34086 r34146 463 463 } 464 464 465 # if (PS_TRACE_ON) 466 if (psTraceGetLevel ("psphot") >= 6) { 467 468 // Moments-based shapes parameters 469 psEllipseMoments moments; 470 moments.x2 = source->moments->Mxx; 471 moments.xy = source->moments->Mxy; 472 moments.y2 = source->moments->Myy; 473 // force the axis ratio to be < 20.0 474 psEllipseAxes axes = psEllipseMomentsToAxes (moments, 20.0); 475 476 // PSF shape parameters 477 psEllipseShape psfShape; 478 psfShape.sx = source->modelPSF->params->data.F32[PM_PAR_SXX] / M_SQRT2; 479 psfShape.sxy = source->modelPSF->params->data.F32[PM_PAR_SXY]; 480 psfShape.sy = source->modelPSF->params->data.F32[PM_PAR_SYY] / M_SQRT2; 481 psEllipseAxes psfAxes = psEllipseShapeToAxes (psfShape, 20.0); 482 483 fprintf (stderr, "--- guess values ---\n"); 484 fprintf (stderr, "(x,y): %f, %f Mxx: %f, Myy: %f, Mxy: %f -> major: %f, minor: %f, theta: %f (%f deg)\n", source->peak->xf, source->peak->yf, source->moments->Mxx, source->moments->Myy, source->moments->Mxy, axes.major, axes.minor, axes.theta, axes.theta*PS_DEG_RAD); 485 fprintf (stderr, "psf: major: %f, minor: %f, theta: %f (%f deg)\n", psfAxes.major, psfAxes.minor, psfAxes.theta, psfAxes.theta*PS_DEG_RAD); 486 for (int i = 0; i < model->params->n; i++) { 487 fprintf (stderr, "par %d: %f\n", i, model->params->data.F32[i]); 488 } 489 } 490 if (psTraceGetLevel ("psphot") >= 7) { 491 psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5); 492 } 493 # endif 494 465 495 // for sersic models, use a grid search to choose an index, then float the params there 466 496 if (modelType == pmModelClassGetType("PS_MODEL_SERSIC")) { … … 468 498 } 469 499 500 options.mode = PM_SOURCE_FIT_EXT; 470 501 if (modelType == pmModelClassGetType("PS_MODEL_SERSIC")) { 471 502 options.mode = PM_SOURCE_FIT_NO_INDEX; 472 } else {473 options.mode = PM_SOURCE_FIT_EXT; 474 } 475 476 // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 5); 503 } 504 if (modelType == pmModelClassGetType("PS_MODEL_TRAIL")) { 505 options.mode = PM_SOURCE_FIT_TRAIL; 506 } 507 477 508 pmSourceFitModel (source, model, &options, maskVal); 478 // fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix); 479 // psTraceSetLevel("psLib.math.psMinimizeLMChi2", 0); 509 510 # if (PS_TRACE_ON) 511 if (psTraceGetLevel ("psphot") >= 5) { 512 if (psTraceGetLevel ("psphot") >= 6) { 513 fprintf (stderr, "chisq: %f, nIter: %d, radius: %f, npix: %d\n", model->chisqNorm, model->nIter, model->fitRadius, model->nPix); 514 } 515 fprintf (stderr, "--- fitted values ---\n"); 516 for (int i = 0; i < model->params->n; i++) { 517 fprintf (stderr, "par %d: %f\n", i, model->params->data.F32[i]); 518 } 519 psTraceSetLevel("psLib.math.psMinimizeLMChi2", 0); 520 } 521 # endif 480 522 481 523 return (model);
Note:
See TracChangeset
for help on using the changeset viewer.
