Opened 7 years ago

Last modified 6 years ago

#1022 new defect

sum and product models won't work with multiplicity

Reported by: pkienzle Owned by:
Priority: major Milestone: SasView 4.3.0
Component: SasView Keywords:
Cc: Work Package: SasView Bug Fixing

Description

See discussion in ticket #1006 and pull request #53.

This will also be a problem in mixture.py, if you are combining two models, one of which is a multiplicity model (combining two multiplicity models should raise an error). In that case, the control parameter will need to be tagged with the appropriate 'A_', 'B_', … prefix before assigning, and the hidden() function, if present, will need to be wrapped so that the parameter names in the returned set are also prefixed.

Other parameters in model_info.ModelInfo? should not be a problem. profile, profile_axes (for spherical shell models) are probably going to be drawn from the form_factor, and so don't need to be included. single and opencl are used internally to select a calculator, and can be undefined for this model (this model should present as a python model).

Change History (7)

comment:1 Changed 7 years ago by butler

  • Milestone changed from SasView 4.2.0 to SasView 4.3.0

comment:2 Changed 6 years ago by pkienzle

A user wanted a fuzzy core-shell sphere plus a lorentzian. We did this by creating a sphere+lorentz model then edited the model, changing sphere to spherical_sld. The model works, but the user has to know to ignore the parameters for the extra shells.

Adapted model:

from sasmodels.core import load_model_info
from sasmodels.sasview_model import make_model_from_info

model_info = load_model_info('spherical_sld+lorentz')
model_info.name = 'snl'
Model = make_model_from_info(model_info)

comment:3 Changed 6 years ago by Paul Kienzle <pkienzle@…>

In 15c80af4414c35749bdc01df46d248dfddd485d3/sasmodels:

propagate first multiplicity parameter to sum model. Refs #1022.

comment:4 Changed 6 years ago by Paul Kienzle <pkienzle@…>

In b171acdab344b2827f9bdca29d66411c2484991f/sasmodels:

move 'multiplicity' handling into sasview model. Refs #1022.

comment:5 Changed 6 years ago by Paul Kienzle <pkienzle@…>

In 4f4d3e3574a18563fda8a9f5e84a9106aa7a1f1e/sasmodels:

re-enable control parameter for rpa model. Refs #1022

comment:6 Changed 6 years ago by pkienzle

Sasmodels has been fixed.

Sasview needs to be updated so that the list of available models presented on the sum/multi box in sasview includes models with multiplicity.

Could redo the sasview model table view so that parameter list is updated whenever any control parameter is updated (sasmodels parameters each have an "is_control" attribute), and drop the notion of a "multiplicity" model.

comment:7 Changed 6 years ago by butler

This is linked to #473 which is more the GUI side. When fully implemented this ticket should be closed.

Note: See TracTickets for help on using tickets.