These are chat archives for astropy/astropy

17th
Feb 2017
prajwel
@prajwel
Feb 17 2017 09:36
I am fitting a Moffat2D model using LevMarLSQFitter. How can I derive the error associated with one of the fitted parameter?
Zé Vinícius
@mirca
Feb 17 2017 09:37
HI @prajwel there’s a dictionary in the LevMarLSQFitter object called fit_info
you can retrive the variances associated with the fitted parameters using fit_info[‘param_cov’]
:)
prajwel
@prajwel
Feb 17 2017 09:43
Hi @mirca , thank you for the prompt reply. Can you dumb down that a little bit for me? I am not a python expert :worried:
m_init=models.Moffat2D(1,8,8,3,3)
fit_lev = fitting.LevMarLSQFitter()
ym, xm = np.mgrid[:15, :15]
m = fit_lev(m_init, xm, ym, starsq)
For example, where to go from here? :smile:
Zé Vinícius
@mirca
Feb 17 2017 09:50
@prajwel sure, after the last line, you do param_cov = fit_lev.fit_info[‘param_cov’]
then you have your parameter covariance matrix (param_cov)
prajwel
@prajwel
Feb 17 2017 09:53
@mirca You are a saviour :smile: :sparkles: :satisfied:
Zé Vinícius
@mirca
Feb 17 2017 09:53
@prajwel come on, hahaha
;-)
matrixbot
@matrixbot
Feb 17 2017 10:43
Cadair @mhvk you in here?