-
Notifications
You must be signed in to change notification settings - Fork 41
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
3014: Beta approximation does not run #3100
Conversation
Tried having a look at this but experienced something which I think is a wider problem (see #3101). So bit difficult to pass judgement on this PR at present. |
@@ -2940,8 +2940,7 @@ def onMainParamsChange(self, top, bottom): | |||
# don't try to update multiplicity counters if they aren't there. | |||
# Note that this will fail for proper bad update where the model | |||
# doesn't contain multiplicity parameter | |||
if self.kernel_module.params.get(parameter_name, None): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Suspicious: bool(0.0)
is false, so if the current value of the parameter is 0 then this code wasn't updating it.
I didn't look at the context, but this change may fix other bugs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are a number of issues when params become 0. We should also test to see if this solves #3053
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Out of curiosity, I decided to test and, unless I am mistaking the issue, this should now fix #3053.
@smk78 - do you have time to test this? Getting this into 6.0 is a priority. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I have re-reviewed using https://github.com/SasView/sasview/actions/runs/10638002500 on W10/x64, testing for each of the issues reported in #3014 , #3053 , #3101 and #3108 . As far as my testing could discern, this PR fixes the anomoulous behaviour in each of those. On that basis I think it is good to go.
I have not tested for #3109 , mentioned in this PR, because I could not tell if the commits in that had been merged with this branch.
Description
The changes related to multiplicity models (#2647) took a step too far and broke parameter updates for
structure_factor_mode
and other non-layer-parameter combo boxes. This removes an extra if statement that should not be reachable for the layer parameter. This might have a collateral effect on multiplicity models, though I couldn't find any.Fixes #3014
Fixes #3053 (possibly)
Fixes #3108 (possibly)
How Has This Been Tested?
Selected a P*S model and selected the beta approximation. The calculation generated the expected plots. Tested various features of multiplicity models to see if they still worked and did not notice anything off. Also tested the pinning of param values to 0.0 and that is, tangentially fixed.
Review Checklist:
[if using the editor, use
[x]
in place of[ ]
to check a box]Documentation (check at least one)
Installers
Licencing (untick if necessary)