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

3014: Beta approximation does not run #3100

Merged
merged 1 commit into from
Sep 20, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/sas/qtgui/Perspectives/Fitting/FittingWidget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Copy link
Contributor

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.

Copy link
Contributor Author

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

Copy link
Contributor Author

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.

self.kernel_module.setParam(parameter_name, value)
self.kernel_module.setParam(parameter_name, value)
elif model_column == min_column:
# min/max to be changed in self.kernel_module.details[parameter_name] = ['Ang', 0.0, inf]
self.kernel_module.details[parameter_name][1] = value
Expand Down
Loading