Opened 7 years ago

Closed 7 years ago

#664 closed defect (fixed)

custom models not appearing with structure factor button

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


Custom models are not identified as form factor models even though they define the ER function. This means that the Structure Factor button is not appearing on the fit page.

To reproduce, create a custom model MyFunction such as:


    return a*x + b

Select Custom Model then select MyFunction. No Structure Factor button appears.

Note: maybe use "form_factor=True" im models to identify form factors rather than the presence of the ER function. Or maybe use the presence of volume parameters.

Change History (3)

comment:1 Changed 7 years ago by pkienzle

Two steps:

(1) model types need to be identified when plugin directory is first scanned, and when plugins are edited.

Identification appears to happen in sasview/src/sas/sasgui/perspectives/fitting/, but only for standard models, not for plugin models.

Presumably this is only called at startup, not whenever the models are edited.

(2) GUI needs to be updated so that the relevant models are in the proper combo boxes.

On model save, need to tell fitting/ to update the model lists, clear all existing combo boxes and put in the new lists.

comment:2 Changed 7 years ago by mathieu

  • Owner set to mathieu
  • Status changed from new to accepted

comment:3 Changed 7 years ago by mathieu

  • Resolution set to fixed
  • Status changed from accepted to closed

In e28f34db2dfc37fe6b56562a15f0507a158b7261/sasview:

Allow structure factors for custom models. Fixes #664

Note: See TracTickets for help on using tickets.