Opened 8 years ago

Last modified 7 years ago

#879 new defect

default value and limits are ignored for muliplicity/variant models

Reported by: pkienzle Owned by:
Priority: minor Milestone: SasView 5.0.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

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.

Change History (2)

comment:1 Changed 8 years ago by pkienzle

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.

comment:2 Changed 7 years ago by butler

  • Milestone changed from SasView 4.2.0 to SasView 5.0.0
Note: See TracTickets for help on using tickets.