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

default value and limits are ignored for muliplicity/variant models (Trac #879) #965

Open
pkienzle opened this issue Mar 30, 2019 · 5 comments
Labels
Defect Bug or undesirable behaviour Minor Small job Multiplicity Issue related to handling of multiplicity

Comments

@pkienzle
Copy link
Contributor

pkienzle commented Mar 30, 2019

The model default value for multiplicity is ignored when selecting the model. To see this, select the RPA model, change the case num to 3, switch to the unified power Rg and it will have 3 levels. Set case num to 0 and switch to spherical_sld and you will have n_shells=0 even though n_shells has limits of [1, 10]. The upper limit is respected.

Migrated from http://trac.sasview.org/ticket/879

{
    "status": "new",
    "changetime": "2017-10-26T12:53:39",
    "_ts": "2017-10-26 12:53:39.698146+00:00",
    "description": "The model default value for multiplicity is ignored when selecting the model.  To see this, select the RPA model, change the case num to 3, switch to the unified power Rg and it will have 3 levels.  Set case num to 0 and switch to spherical_sld and you will have n_shells=0 even though n_shells has limits of [1, 10].  The upper limit is respected.",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "",
    "workpackage": "SasView Bug Fixing",
    "time": "2017-03-09T15:54:51",
    "component": "SasView",
    "summary": "default value and limits are ignored for muliplicity/variant models",
    "priority": "minor",
    "keywords": "",
    "milestone": "SasView 5.0.0",
    "owner": "",
    "type": "defect"
}
@pkienzle pkienzle added this to the SasView 5.0.0 milestone Mar 30, 2019
@pkienzle pkienzle added Defect Bug or undesirable behaviour Incomplete Migration Minor Small job and removed Incomplete Migration labels Mar 30, 2019
@pkienzle
Copy link
Contributor Author

Trac update at 2017/03/09 16:22:37: pkienzle commented:

Line 3624 of basepage.py sets the initial multiplicity to 1 rather than 0.

Line 2003-2031 of basepage.py uses the current value of multiplicity for the new model.

Line 1765-1766 of basepage.py populate the multifactor box with numbers from 0 to multiplicity-1.

A possible fix is to extend sasmodels.sasview_model so that MultiplicityInfo (line 74) includes default and the lower limit (the upper limit is already there as attribute "number"). These will need to be initialized from p.default and p.limit[0] (line 215). The default value should be used in basepage.py line 2003-2013 to set the initial value.

Dealing with the lower limit is more complicated. The current code assumes that the list is numbered from 0, and that selection number in the combobox matches the integer.

@butlerpd
Copy link
Member

Trac update at 2017/10/26 12:53:39: butler changed milestone from "SasView 4.2.0" to "SasView 5.0.0"

@rozyczko
Copy link
Member

rozyczko commented May 1, 2019

I think we resolved this in 5.0 after some investigative QA by Richard.
The default multip value is taken directly from the model (p.default) and the range also is read from p.limit[0] as indicated.

@rozyczko
Copy link
Member

Leaving it open in case this needs reimplementation in 4.x

@rozyczko rozyczko modified the milestones: SasView 5.0.0, SasView 5.1.0 May 15, 2019
@rozyczko
Copy link
Member

Also, changing the milestone so the above can be discussed.

@rozyczko rozyczko modified the milestones: SasView 5.1.0, SasView 4.3.0 Jul 26, 2019
@smk78 smk78 added the Multiplicity Issue related to handling of multiplicity label Sep 21, 2023
@lucas-wilkins lucas-wilkins removed this from the SasView 4.3.0 milestone Mar 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Bug or undesirable behaviour Minor Small job Multiplicity Issue related to handling of multiplicity
Projects
None yet
Development

No branches or pull requests

5 participants