Hi,
thanks for this fabulous library. It completely replaces everything I have written so far in the respect of python parameter estimation toolkits.
I'm in middle of the first project that really uses lmfit, but I get stuck. I have searched the Release Notes and the mailing list, but either I have overlooked the hint or I didn't recognize it.
For now I'm stuck with an older version of lmfit (0.8.0), due to the infrastructue I'm developing for (currently still Debian 8). But also didn't get it to work with 0.8.3, nor with the most recent 0.9.3.
I do a pre-defined model curve fit to some data. The result seems promising enough, but as a step in the further processing I'd like to evaluate the found result function at a number of different points.
My understanding was a chain like: model.fit( data) ---> fitresult() ---> .eval(data=different_xdata) ---> evaluated y-values
But this only returns the initially used data points (actually only the used x-values); with a complete disregard for the argument keyword 'data'.
Am I doing something wrong? And if so, what is it?
fitresult = myfunc.fit(data, x=independentVariable)
fitresult.eval(x=otherData)
fittedmodel = fitresult.model
fittedmodel.eval(x=otherData)
fitresult.eval(x=otherData)
the otherData replaces the original data in the fitresult object. So when you then call:fitresult.eval()
What I have just noticed, is that after a call such as this one:fitresult.eval(x=otherData)the otherData replaces the original data in the fitresult object. So when you then call:fitresult.eval()
it uses otherData again. Same behaviour for any keyword arguments.
If this is by design, it should probably be mentioned somewhere (in addition to here).
Doing a plot() after this uses the old data with the new x, which will most probably not be correct.
Also, the plot doesn't appear to to pass keyword arguments on to the model function.
Hopefully this is useful information for someone.