Return values of parameters calculated by lmfit

1

Good morning, everyone. I run a minimization test with lmfit ( link ) but I can not make / extract the values of a given parameter , here called numax , defined by 'gauss_center' .

import numpy as np
import scipy as sp
import matplotlib.pyplot as plt 
import sys
import lmfit
plt.plot(x, y, 'r.',lw=0.5, label='peaks')
mod = GaussianModel(prefix='gauss_')
pars = mod.guess(y, x=x)
out  = mod.fit(y, pars, x=x)
data = out.fit_report()
#print(data)
result = out.minimize(method='leastsq')
ci = conf_interval(out, result, p_names=
      ['gauss_center','gauss_amplitude'], sigmas=(1, 2, 3))
report = lmfit.printfuncs.report_ci(ci)
center = out.params['gauss_center']
numax = lmfit.Parameter(center, value=True, user_data=True)
print(numax)

The output of the terminal already calculates everything (this is not the doubt), but the question is to know how to save 'value' of Parameter 'gauss_center' as numax to be used afterwards.

<Parameter '<Parameter 'gauss_center', value=218.5097206306099 +/- 0.645**, bounds=[-inf:inf]>', True, bounds=[-inf:inf]>

The value is correct, I wanted to extract it and its characteristic error.

    
asked by anonymous 14.10.2017 / 14:11

0 answers