Package for calculation of small angle scattering models using OpenCL. Builds here:
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
.travis Try re-encrypting travis_rsa Sep 11, 2017
doc Added definition of def random() to plugin.rst Sep 18, 2018
explore show u-sub integration as used in models in explore/ Apr 2, 2018
extra suppress lint errors from scipy Nov 30, 2017
sasmodels Replaced sasview doc dependency from in sasmodels Sep 9, 2018
compare.bat back out attempted marketplace update fix Jan 16, 2018
multi_compare.bat support compare/multi_compare on windows Nov 24, 2015 Scale and background paramters frozen in line model Feb 9, 2016
pytest.ini add support for pytest and use it on travis/appveyor Jan 27, 2018
sascomp add 'test' target to Jan 27, 2018



Theory models for small angle scattering.

The models provided are usable directly in the bumps fitting package and in the sasview analysis package. If OpenCL is available, the models will run much faster. If not, then precompiled versions will be included with the distributed package. New models can be added if OpenCL or a C compiler is available.


The example directory contains a radial+tangential data set for an oriented rod-like shape.

The data is loaded by sas.dataloader from the sasview package, so sasview is needed to run the example.

To run the example, you need sasview, sasmodels and bumps. Assuming these repositories are installed side by side, change to the sasmodels/example directory and enter:

PYTHONPATH=..:../../sasview/src ../../bumps/ \
    cylinder --preview

See bumps documentation for instructions on running the fit. With the python packages installed, e.g., into a virtual environment, then the python path need not be set, and the command would be:

bumps cylinder --preview

The model accepts up to two arguments. The first argument is the model type, which has been defined for cylinder, capped_cylinder, core_shell_cylinder, ellipsoid, triaxial_ellipsoid and lamellar. The second argument is view, which can be radial or tangential. To fit both radial and tangential simultaneously, use the word "both".


cylinder.c + is the cylinder model with renamed variables and sld scaled by 1e6 so the numbers are nicer. The model name is "cylinder" is an example of a single file model with embedded C code.