Opened 7 years ago

Last modified 7 years ago

#1061 new defect

minor isue with simultaneous / constrained fits

Reported by: richardh Owned by: krzywon
Priority: minor Milestone: SasView 4.3.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

Trying to break constrained simultaneous fit between 3 data sets (see attached project) with different models in current master for 4.2

Save project and load project worked fine, twice around, though each time the fit pages appeared in a different order the data and models still matched (hooray).

However, having hit "fit" from the constraints page, if I then hit "fit" on an individual fit page gets error message:

2018-01-15 13:04:33 : Traceback (most recent call last):

File "C:\sasview42\sasview\src\sas\sasgui\perspectives\fitting\fit_thread.py", line 78, in compute

result = map(map_apply, inputs)

File "C:\sasview42\sasview\src\sas\sasgui\perspectives\fitting\fit_thread.py", line 14, in map_apply

return apply(arguments[0], arguments[1:])

File "C:\sasview42\sasview\src\sas\sasgui\perspectives\fitting\fit_thread.py", line 11, in map_getattr

return  getattr(classInstance, classFunc)(*args)

File "C:\sasview42\sasview\src\sas\sascalc\fit\BumpsFitting.py", line 279, in fit

result = run_bumps(problem, handler, curr_thread)

File "C:\sasview42\sasview\src\sas\sascalc\fit\BumpsFitting.py", line 379, in run_bumps

'uncertainty': getattr(fitdriver.fitter, 'state', None),

AttributeError: 'FitDriver' object has no attribute 'fitter'
 

None

Turning off and back on any parameters with red NaN in their error bar fields (ie the parameters that were constrained), then hit "stop", gets the "fit" button back to normal and you can then do a fit on a single data set.

Attachments (1)

sasview_proj_6constraints_15Jan18.svs (83.0 KB) - added by richardh 7 years ago.
Project with 3 data sets, 6 constraints, two different models

Download all attachments as: .zip

Change History (4)

Changed 7 years ago by richardh

Project with 3 data sets, 6 constraints, two different models

comment:1 Changed 7 years ago by krzywon

I was able to reproduce the issue but without using the save/load project scheme. This looks to be related to what is returned from the simultaneous and constrained fitting engine, not saving and loading projects, more specifically, the NaNs? in the error boxes received from the constrained parameters. I don't have a solution yet.

I seem to recall another ticket relating to the errors returned from the simultaneous fit page, but can't seem to find it.

comment:2 Changed 7 years ago by richardh

I also had a look for further mention of parameter error values from constraints, but only found ticket #441 which mentions other obscure behaviour from the constraints.

The underlying assumption in sasview is (alas) that all the base parameters in a constraint are adjusting, if they are then fixed it is not clear (I need to check this again now) that constraints are actively applied.

Looks like we need to find out why the parameter errors on constrained parameters turn into red NaN. Paul K has previously said that the red indicates sasview has seen a "problem". (Which indeed should be the case as the constrained parameter is neither fixed nor has any proper error information from the least squares or other fit method.)

In principle the error values can be calculated, from the errors on the base parameters that are fitting, via some partial derivatives of the constraint formula, which would have to be computed numerically.

Alternatively, and perhaps simpler for a quick fix for the error initially reported in this ticket, the red NaN in the errors column ought not to cause an upset if you hit "fit" on an individual fit page, as the values in that column should not actually matter to starting a fit.

comment:3 Changed 7 years ago by butler

  • Milestone changed from SasView 4.2.0 to SasView 4.3.0
Note: See TracTickets for help on using tickets.