musevlt / mpdaf

MUSE Python Data Analysis Framework
BSD 3-Clause "New" or "Revised" License
15 stars 4 forks source link

Calculating the FWHM errors of a 2D Moffat fit #12

Open amyszka opened 4 years ago

amyszka commented 4 years ago

Python 3.7.6 numpy 1.18.2 astropy 4.0 MPDAF 3.4

When calculating the error on the FWHM of a 2D Moffat fit (mpdaf/obj/image.py line 2291), the script divides the second error component by the error in eccentricity rather than the eccentricity itself. In most cases, this leads to strange-looking reported FWHM results such as: [INFO] fwhm = (4.60711,4.32469) (error:(0.802868,87.6039)). A more reasonable value seems to appear if the code is changed to divide the second component by eccentricity only, obtaining [INFO] fwhm = (4.60711,4.32469) (error:(0.802868,0.753652)) in the same case.

Image.py line 2291 reads: err_fwhm = np.array([err_fwhm, err_fwhm / err_e]) Changed to: err_fwhm = np.array([err_fwhm, err_fwhm / e])

Is the choice to divide by the error in eccentricity by design, or would it be best to use just the eccentricity?