Hi everyone,
I use lmfit and I need to modify some parameters' values inside the fitting function:
the parameters are:
params = Parameters()
params.add('k3', value=k3guess, max=-1e-7, vary = True)
params.add('lb', value=lb, min=w[0], max=w[-1], vary = False)
params.add('mu', value=muguess, min=0, vary = True)
params.add('K', value=K, min=0, vary = False)
my fitting function is:
def firstham(w, amp, k3, lb, mu, K):
...
inside this function I have some controlling values likes:
I noticed that even thou the paramters change inside the fitting function, at the end of the fitting in fit_report I won't get the last correct parameters value, why?
Another question, in the guide it is written: **kwargs (optional) – Arguments to pass to the model function, possibly overriding
params
How can I pass the params to the function?
thank you,
Giulio