SasView / temp

0 stars 0 forks source link

vesicle @ structure_factor incorrect (Trac #1257) #8

Open pkienzle opened 5 years ago

pkienzle commented 5 years ago

Comparing vesicle@S with no core to sphere@S I get different answers. Repeat using:

    $ sascomp vesicle@hardsphere,sphere@hardsphere radius=0,thickness thickness=40 -pars -midq -double

This is not true for hollow_cylinder with no core vs cylinder:

    $ sascomp hollow_cylinder@hardsphere,cylinder@hardsphere radius=0,thickness thickness=40 -pars -double

I think the issue is that the vesicle model defines volfraction, and this is colliding with the definition of volfraction in the structure factor, which then gets turned into volfraction_S.

Vescicle and sphere match if volfraction_S is set to the same value as volfraction.

    $ sascomp vesicle@hardsphere,sphere@hardsphere volfraction_S=0.05 scale=20,1 radius=0,thickness thickness=40 -pars -midq -double

Should update product model to use volfraction if it exists in the model.

This will require changes to sasmodels/product.py, both when constructing the model and when splitting the parameter set into P and S parameters.

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

{
    "status": "new",
    "changetime": "2019-03-25T21:00:59",
    "_ts": "2019-03-25 21:00:59.327232+00:00",
    "description": "Comparing vesicle@S with no core to sphere@S I get different answers.  Repeat using:\n{{{\n    $ sascomp vesicle@hardsphere,sphere@hardsphere radius=0,thickness thickness=40 -pars -midq -double\n}}}\n\nThis is not true for hollow_cylinder with no core vs cylinder:\n{{{\n    $ sascomp hollow_cylinder@hardsphere,cylinder@hardsphere radius=0,thickness thickness=40 -pars -double\n}}}\n\nI think the issue is that the vesicle model defines volfraction, and this is colliding with the definition of volfraction in the structure factor, which then gets turned into volfraction_S.\n\nVescicle and sphere match if volfraction_S is set to the same value as volfraction.\n{{{\n    $ sascomp vesicle@hardsphere,sphere@hardsphere volfraction_S=0.05 scale=20,1 radius=0,thickness thickness=40 -pars -midq -double\n}}}\n\nShould update product model to use volfraction if it exists in the model.\n\nThis will require changes to `sasmodels/product.py`, both when constructing the model and when splitting the parameter set into P and S parameters.\n",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "",
    "workpackage": "SasView Bug Fixing",
    "time": "2019-03-25T21:00:59",
    "component": "SasView",
    "summary": "vesicle @ structure_factor incorrect",
    "priority": "major",
    "keywords": "",
    "milestone": "SasView 4.3.0",
    "owner": "",
    "type": "defect"
}