Conversation
DrPaulSharp
left a comment
There was a problem hiding this comment.
Very good spot here @rozyczko!
A couple of things from me, firstly, does this fix also need to be applied to the following lines dealing with the uncertainty and min/max values? It looks to me like they could trip on a zero value as well. Secondly, do you have an example of a bug that this branch fixes? I tried the instructions in #3053 but couldn't reproduce the bug there.
|
This is a needed change, but I'm not seeing any improvement in the magnetic/2D fitting functionality. I think this should be merged, but don't think it fixes the underlying issue in #3053. I'll update the issue on recreating the problem later today. |
|
The magnetic parameter values stored in Added Added immediate sync to kernel_module when magnetic parameters are initialized. Also, fixed typos in the polydisp widget. |
krzywon
left a comment
There was a problem hiding this comment.
This seems to be working now! I get real errors and the magnetic params change as a part of the fit. Code looks good.
|
@DrPaulSharp, when you are able, could you compare the behavior outlined in #3053 comment in both this branch and in main? I want to be sure others are able to see the difference in behavior before merging. |
|
Hi @krzywon I've tried this, and on this branch I do find that the values change on a fit, but the errors are still extremely large: |

Description
In the
param_remap_to_sasmodels_convertmethod, the conditionif not value:incorrectly treated the value 0.0 as false. When orientation parameters like theta or phi were set to 0, they were being replaced withnp.nan, breaking subsequent fits.Fixes #3053
How Has This Been Tested?
Local tests
Review Checklist:
[if using the editor, use
[x]in place of[ ]to check a box]Documentation (check at least one)
Installers
Licensing (untick if necessary)