You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug #3366 allows the constrained fit window to launch after part one of the fitting refactor, but fits are now failing with the following error. This is likely related to bumps v1 attempting to coerce parameter values to floats, where we have always sent uncertainty quantities. The fix is to set Parameter.slot to the uncertainty quantity and Parameter.val to the raw floating point value.
ERROR: Fitting failed: Traceback (most recent call last): File "sas\qtgui\Perspectives\Fitting\FitThread.py", line 17, in map_getattr return_value = getattr(classInstance, classFunc)(*args) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "sas\sascalc\fit\BumpsFitting.py", line 315, in fit problem.setp_hook() File "sas\sascalc\fit\BumpsFitting.py", line 232, in call self.update() File "M2.background=M3.background M2.scale=M3.scale M2.radius=M3.radius M1.radius=M2.radius M1.background=M2.background M1.scale=M2.scale", line 11, in eval_expressions File "bumps\parameter.py", line 451, in value return int(self.slot) if self.discrete else float(self.slot) ^^^^^^^^^^^^^^^^ File "uncertainties\core.py", line 2611, in raise_error raise TypeError("can't convert an affine function (%s)" TypeError: can't convert an affine function () to float; use x.nominal_value
Describe the bug
#3366 allows the constrained fit window to launch after part one of the fitting refactor, but fits are now failing with the following error. This is likely related to bumps v1 attempting to coerce parameter values to floats, where we have always sent uncertainty quantities. The fix is to set
Parameter.slotto the uncertainty quantity andParameter.valto the raw floating point value.To Reproduce
Steps to reproduce the behavior:
Expected behavior
The fit should continue without errors.
SasView version (please complete the following information):