#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

Description

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:

    a=1
    b=0

    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 12 months 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/models.py:_getModelList, 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/basepage.py to update the model lists, clear all existing combo boxes and put in the new lists.

comment:2 Changed 12 months ago by mathieu

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

comment:3 Changed 12 months 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.