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

calculate all I(q) values needed for 1D resolution in one call (Trac #717) #839

Open
pkienzle opened this issue Mar 30, 2019 · 2 comments
Open
Labels
Defect Bug or undesirable behaviour Major Big change in the code or important change in behaviour

Comments

@pkienzle
Copy link
Contributor

pkienzle commented Mar 30, 2019

When I(q) is computed with resolution, the theory values are first computed for the measured points, then another call is made to compute the points before the first measured point and another call is made to compute the points after the last measured point. This will significantly slow down the throughput on the GPU for simple models, where the overhead of three calls will be larger than cost of the calls.

This is one step toward refactoring the fitting perspective to more cleanly separate computation from user interface.

See code in:

    sas.sascalc.data_util.qsmearing.PySmear.apply

called from:

     sas.sasgui.perspectives.fitting.model_thread.Calc1D.compute
     sas.sascalc.fit.AbstractFitEngine.FitData1D.residuals

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

{
    "status": "new",
    "changetime": "2017-03-08T17:03:14",
    "_ts": "2017-03-08 17:03:14.148073+00:00",
    "description": "When I(q) is computed with resolution, the theory values are first computed for the measured points, then another call is made to compute the points before the first measured point and another call is made to compute the points after the last measured point.  This will significantly slow down the throughput on the GPU for simple models, where the overhead of three calls will be larger than cost of the calls.\n\nThis is one step toward refactoring the fitting perspective to more cleanly separate computation from user interface.\n\nSee code in:\n{{{\n    sas.sascalc.data_util.qsmearing.PySmear.apply\n}}}\ncalled from:\n{{{\n     sas.sasgui.perspectives.fitting.model_thread.Calc1D.compute\n     sas.sascalc.fit.AbstractFitEngine.FitData1D.residuals\n}}}",
    "reporter": "pkienzle",
    "cc": "",
    "resolution": "",
    "workpackage": "SasView Bug Fixing",
    "time": "2016-10-06T16:42:12",
    "component": "SasView",
    "summary": "calculate all I(q) values needed for 1D resolution in one call",
    "priority": "major",
    "keywords": "",
    "milestone": "SasView Next Release +1",
    "owner": "",
    "type": "defect"
}
@pkienzle pkienzle added this to the SasView Next Release +1 milestone Mar 30, 2019
@pkienzle pkienzle added Defect Bug or undesirable behaviour Incomplete Migration Major Big change in the code or important change in behaviour and removed Incomplete Migration labels Mar 30, 2019
@pkienzle
Copy link
Contributor Author

Trac update at 2016/10/10 18:25:09: pkienzle commented:

Also, separate model setup from model call so that model+q is initialized before fit and reused for each step of the computation. In sasmodels.sasview_model.SasviewModel.calculateIq the model is being loaded from file and released each call (DLL), and a new q vector is being created each call (OpenCL).

@pkienzle
Copy link
Contributor Author

Trac update at 2017/03/08 17:03:14: pkienzle commented:

With q_calc completely independent of q we can increase the sampling density between q values as needed for the resolution. See ticket SasView/sasmodels#263.

Maybe put oversampling under user control. If fitting a system of large mono-disperse particles, we ought to sample q more densely than the fringe spacing in the model when computing the resolution. This allows users to work around the issue that sasmodels does not do adaptive integration for resolution. See ticket SasView/sasmodels#535.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Defect Bug or undesirable behaviour Major Big change in the code or important change in behaviour
Projects
None yet
Development

No branches or pull requests

2 participants