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

Failed S(Q) fitting causes loss of function #3147

Open
olihammond opened this issue Nov 12, 2024 · 0 comments
Open

Failed S(Q) fitting causes loss of function #3147

olihammond opened this issue Nov 12, 2024 · 0 comments

Comments

@olihammond
Copy link

Describe the bug
Fitting with a structure factor can take a long time to converge, or can fail, due to a large number of free/correlated parameters. In this case the fit can be manually stopped by the user. Once the fit has been stopped, the fitting function is lost. The user must then either reselect the model, or resend the data to fit and start again, inputting all parameters repeatedly, to continue fitting their data. Several errors are printed following this:

10:39:08 - ERROR: can only concatenate str (not "method") to str Traceback (most recent call last): File "sas/sascalc/fit/BumpsFitting.py", line 403, in run_bumps File "bumps/fitters.py", line 970, in fit File "bumps/fitters.py", line 567, in solve File "bumps/mpfit.py", line 1223, in init TypeError: can only concatenate str (not "method") to str SVD did not converge Traceback (most recent call last): File "sas/sascalc/fit/BumpsFitting.py", line 423, in run_bumps File "bumps/fitters.py", line 1056, in cov File "bumps/lsqerror.py", line 277, in jacobian_cov File "numpy/linalg/linalg.py", line 1681, in svd File "numpy/linalg/linalg.py", line 121, in _raise_linalgerror_svd_nonconvergence numpy.linalg.LinAlgError: SVD did not converge === Steps: 5 of 200 chisq: 209 ETA: 2024-11-12 10:39 (2s from now) M15.background : 0.514 | M15.charge : 1e-06 | M15.length : 57.3 M15.radius : 4.44 | M15.volfraction : 0.153 |
10:39:08 - ERROR: Traceback (most recent call last): File "sas/qtgui/Perspectives/Fitting/FittingWidget.py", line 2123, in fitComplete IndexError: list index out of range

To Reproduce
Steps to reproduce the behavior:

  1. Send a dataset for fitting
  2. Choose a shape-dependent function and the hayter_msa S(Q)
  3. Start fitting, but hit the stop fit button
  4. See error (subsequent fitting attempts will fail instantly unless a different model is chosen, or data are refreshed)

Expected behavior
In the case of nonconvergence, one should be able to continue working from the state of the fitting parameters prior to the failed attempt. Once this error occurs one must either reload the file, or reselect the desired model and input the parameters once more, which is cumbersome.

Screenshots
If applicable, add screenshots to help explain your problem.

SasView version (please complete the following information):

  • Version: 6.0.0, but has been observed in 5.0.5, 5.0.6, etc.

Operating system (please complete the following information):

  • OS: OSX Ventura 13.7.1

Additional context
Add any other context about the problem here.

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

No branches or pull requests

1 participant