Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

custom models not appearing with structure factor button (Trac #664) #795

Closed
pkienzle opened this issue Mar 30, 2019 · 3 comments
Closed
Assignees
Labels
Defect Bug or undesirable behaviour Minor Small job
Milestone

Comments

@pkienzle
Copy link
Contributor

pkienzle commented Mar 30, 2019

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.

Migrated from http://trac.sasview.org/ticket/664

{
    "status": "closed",
    "changetime": "2016-10-08T17:44:40",
    "_ts": "2016-10-08 17:44:40.016127+00:00",
    "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.\n\nTo reproduce, create a custom model !MyFunction such as:\n{{{\n    a=1\n    b=0\n\n    return a*x + b\n}}}\nSelect Custom Model then select !MyFunction.  No Structure Factor button appears.\n\nNote: 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.\n",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "fixed",
    "workpackage": "SasView Bug Fixing",
    "time": "2016-09-21T14:15:04",
    "component": "SasView",
    "summary": "custom models not appearing with structure factor button",
    "priority": "minor",
    "keywords": "",
    "milestone": "SasView 4.1.0",
    "owner": "mathieu",
    "type": "defect"
}
@pkienzle pkienzle added this to the SasView 4.1.0 milestone Mar 30, 2019
@pkienzle pkienzle added Defect Bug or undesirable behaviour Incomplete Migration Minor Small job and removed Incomplete Migration labels Mar 30, 2019
@pkienzle
Copy link
Contributor Author

Trac update at 2016/10/03 22:14:54: pkienzle commented:

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.

@mdoucet
Copy link
Contributor

mdoucet commented Mar 30, 2019

Trac update at 2016/10/08 16:54:13:

  • mathieu changed owner from "" to "mathieu"
  • mathieu changed status from "new" to "accepted"

@mdoucet
Copy link
Contributor

mdoucet commented Mar 30, 2019

Trac update at 2016/10/08 17:44:40:

  • mathieu commented:

In changeset e28f34d:

#!CommitTicketReference repository="sasview" revision="e28f34db2dfc37fe6b56562a15f0507a158b7261"
Allow structure factors for custom models. Fixes #795
  • mathieu changed resolution from "" to "fixed"
  • mathieu changed status from "accepted" to "closed"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Bug or undesirable behaviour Minor Small job
Projects
None yet
Development

No branches or pull requests

2 participants