- Timestamp:
- Jan 22, 2010, 11:30:32 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/20091201/psModules/src/objects/pmPSF.c
r24206 r26669 42 42 #include "pmErrorCodes.h" 43 43 44 45 #define MAX_AXIS_RATIO 20.0 // Maximum axis ratio for PSF model 46 44 47 /*****************************************************************************/ 45 48 /* FUNCTION IMPLEMENTATION - PUBLIC */ … … 405 408 return psf; 406 409 } 410 411 412 float pmPSFtoFWHM(const pmPSF *psf, float x, float y) 413 { 414 PS_ASSERT_PTR_NON_NULL(psf, NAN); 415 416 pmModel *model = pmModelFromPSFforXY(psf, x, y, 1.0); // Model of source 417 psF32 *params = model->params->data.F32; // Model parameters 418 psEllipseAxes axes = pmPSF_ModelToAxes(params, MAX_AXIS_RATIO); // Ellipse axes 419 420 // Curiously, the minor axis can be larger than the major axis, so need to check. 421 float fwhm = 2.355 * PS_MAX(axes.minor, axes.major); // FWHM, converted from sigma 422 423 psFree(model); 424 425 return fwhm; 426 }
Note:
See TracChangeset
for help on using the changeset viewer.
