SasView / sasmodels

Package for calculation of small angle scattering models using OpenCL.
BSD 3-Clause "New" or "Revised" License
15 stars 27 forks source link

Fix volume normalisation on Raspberry model (Trac #845) #140

Open ajj opened 5 years ago

ajj commented 5 years ago

As noted in SasView/sasview#912 the raspberry model needs to be doing volume calculation outside Iq function to get polydispersity working properly.

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

{
    "status": "accepted",
    "changetime": "2018-02-13T02:57:55",
    "_ts": "2018-02-13 02:57:55.022121+00:00",
    "description": "As noted in #815 the raspberry model needs to be doing volume calculation outside Iq function to get polydispersity working properly.",
    "reporter": "ajj",
    "cc": "",
    "resolution": "",
    "workpackage": "SasView Bug Fixing",
    "time": "2017-02-07T15:15:35",
    "component": "sasmodels",
    "summary": "Fix volume normalisation on Raspberry model",
    "priority": "major",
    "keywords": "",
    "milestone": "SasView 4.3.0",
    "owner": "ajj",
    "type": "defect"
}
pkienzle commented 5 years ago

Trac update at 2017/02/07 19:17:41: pkienzle commented:

Should use the square() function for complex calculations:

     sfSS = psiS*psiS*sinc(q*(rL+deltaS*rS))*sinc(q*(rL+deltaS*rS));

becomes:

     sfSS = square(psiS*sinc(q*(rL+deltaS*rS)));

This makes life easier for the compiler since it doesn't have to figure out that the two subexpressions are identical, and saves four multiplies and a branch for each q.

Note that we now have sas_sinx_x as an available function instead of sinc.

ajj commented 5 years ago

Trac update at 2017/04/04 21:52:24:

ajj commented 5 years ago

Trac update at 2017/04/09 13:26:03: ajj commented:

This model doesn't have a single form factor volume as it actually is the sum of two form factors - the raspberry, and the free small particles.

Need to add polydispersity loop directly in this model as the auto polydispersity cannot work.

Longer term, should we implement models like this as composition models?

butlerpd commented 5 years ago

Trac update at 2018/02/13 02:57:55: butler changed milestone from "SasView 4.2.0" to "SasView 4.3.0"