Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

v5 errors when using S(Q) with a multiplicity model such as onion #1816

Closed
RichardHeenan opened this issue Apr 15, 2021 · 3 comments · Fixed by #2647
Closed

v5 errors when using S(Q) with a multiplicity model such as onion #1816

RichardHeenan opened this issue Apr 15, 2021 · 3 comments · Fixed by #2647
Assignees
Labels
Critical High priority Multiplicity Issue related to handling of multiplicity
Milestone

Comments

@RichardHeenan
Copy link
Contributor

after adding an S(Q) to say onion, when I change the number of shells I get:

  • ERROR: Traceback (most recent call last):
    File "C:\sasview5\sasview\src\sas\qtgui\Perspectives\Fitting\FittingWidget.py", line 2625, in onMainParamsChange
    self.kernel_module.setParam(parameter_name, value)
    File "C:\sasview5\sasmodels\sasmodels\sasview_model.py", line 513, in setParam
    raise ValueError("Model does not contain parameter %s" % name)
    ValueError: Model does not contain parameter n_shells

I suspect that once S(Q) is included the F(Q) is then also not being computed correctly, as the effective radius in S(Q) is wrong, only including the first shell, so suspect n_shells is being passed as zero.

[also can someone please add a new milestone, for 5.0.5 ? ]

@RichardHeenan RichardHeenan added the Critical High priority label Apr 15, 2021
@RichardHeenan RichardHeenan added this to the SasView 5.0.4 milestone Apr 15, 2021
@butlerpd butlerpd modified the milestones: SasView 5.0.4, SasView 5.0.5 Apr 15, 2021
@pkienzle
Copy link
Contributor

pkienzle commented Apr 15, 2021

Maybe something in the GUI code which is not treating n_shells as a "multiplicity" parameter. The underlying onion@hardsphere model in sasmodels does define n_shells as a control parameter which the sasview_model wrapper should be turning into a multiplicity parameter. I think that means that the multiplicity parameter n_shells should not be modified as a parameter in the table, but instead a new model created with the correct number of shells as the multiplicity.

@butlerpd butlerpd modified the milestones: SasView 5.0.5, SasView 5.1.0 Jan 31, 2022
@butlerpd
Copy link
Member

I think this is part of a larger issue of how the GUI handles control parameters from sasmodels. See for example SasView/sasmodels#396 and #1897. Unfortunately this larger issues does not seem to have been noted in time to fix for this release.

@smk78 smk78 added the Multiplicity Issue related to handling of multiplicity label Sep 21, 2023
@krzywon
Copy link
Contributor

krzywon commented Mar 5, 2024

As noted in #2647, this was fixed in v5.0.6. Closing.

@krzywon krzywon closed this as completed Mar 5, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Critical High priority Multiplicity Issue related to handling of multiplicity
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants