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

Conversation

krzywon
Copy link
Contributor

@krzywon krzywon commented Aug 30, 2024

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)

  • There is nothing that needs documenting
  • Documentation changes are in this PR
  • There is an issue open for the documentation (link?)

Installers

  • There is a chance this will affect the installers, if so
    • Windows installer (GH artifact) has been tested (installed and worked)
    • MacOSX installer (GH artifact) has been tested (installed and worked)

Licencing (untick if necessary)

  • The introduced changes comply with SasView license (BSD 3-Clause)

@krzywon krzywon requested review from smk78 and butlerpd August 30, 2024 19:15
@krzywon krzywon linked an issue Aug 30, 2024 that may be closed by this pull request
@wpotrzebowski wpotrzebowski added the SasView 6.0.0 Required for 6.0.0 release label Sep 2, 2024
@smk78
Copy link
Contributor

smk78 commented Sep 3, 2024

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):
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.

@krzywon krzywon linked an issue Sep 6, 2024 that may be closed by this pull request
@krzywon
Copy link
Contributor Author

krzywon commented Sep 17, 2024

@smk78 - do you have time to test this? Getting this into 6.0 is a priority.

@krzywon krzywon linked an issue Sep 19, 2024 that may be closed by this pull request
Copy link
Contributor

@smk78 smk78 left a 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.

@krzywon
Copy link
Contributor Author

krzywon commented Sep 20, 2024

Thanks for the review, @smk78. This does not fix #3109, so there's no need to review that.

@krzywon krzywon merged commit 395e20f into release_6.0.0 Sep 20, 2024
34 checks passed
@krzywon krzywon deleted the 3014-beta-approximation-does-not-run branch September 20, 2024 14:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
SasView 6.0.0 Required for 6.0.0 release
Projects
None yet
4 participants