Open pkienzle opened 5 years ago
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.
Trac update at 2017/10/26 12:53:39
: butler changed milestone from "SasView 4.2.0" to "SasView 5.0.0"
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.
Leaving it open in case this needs reimplementation in 4.x
Also, changing the milestone so the above can be discussed.
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