Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lmfit 1.3.0 breaks simpack.FitModel #182

Closed
dkriegner opened this issue Apr 10, 2024 · 2 comments · Fixed by #183
Closed

lmfit 1.3.0 breaks simpack.FitModel #182

dkriegner opened this issue Apr 10, 2024 · 2 comments · Fixed by #183
Assignees

Comments

@dkriegner
Copy link
Owner

FitModel does not work anymore since its badly implemented. (It does not call super.__init__() for example).

@dkriegner dkriegner self-assigned this Apr 10, 2024
@dkriegner dkriegner linked a pull request Apr 10, 2024 that will close this issue
@rugfri
Copy link

rugfri commented Apr 17, 2024

Hi, I think I still have the issue with lmfit 1.3.0

with
mk = xu.simpack.KinematicalModel(ls_s, energy=en, resolution_width=resol)
fitmkin = xu.simpack.FitModel(mk)
result = fitmkin.fit(ydata, params, qarray, lmfit_kws=dict(hkl=qpoint), hkl=qpoint)

I get the error
raise ValueError(f"'Missing independent variable '{var}'")

which comes from xrayutilities src

--> 268 res = super().fit(data[mask], params, x=x[mask], weights=mweights,
269 fit_kws=fit_kws, iter_cb=cb_func, **lmfit_kws)

I have xrayutilities version 1.7.6 and lmfit 1.3

@dkriegner
Copy link
Owner Author

If you test with version 1.7.6 then it can't be fixed. If you want to check if the next (to be released) version will fix the issue you have to install the development version. see here to see how you can do this easiest:
https://sourceforge.net/p/xrayutilities/mailman/message/37188943/

If you can test this before I release the next version this is of course appreciated!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants