Package for calculation of small angle scattering models using OpenCL. Builds here: https://jenkins.esss.dk/sasview/view/Sasmodels-Builds/
Clone or download
wpotrzebowski Merge pull request #93 from SasView/ticket-1015-quick-fix
Ticket 1015. Clean out existing kernels when changing compute engine
Latest commit 899e050 Nov 29, 2018
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.travis Try re-encrypting travis_rsa Sep 11, 2017
doc add docs for 'model_info=...' to plugin guide Nov 16, 2018
example update docs for the slurm batch program Jul 19, 2018
explore add gammaln and gammainc to the opencl math library Oct 12, 2018
extra suppress lint errors from scipy Nov 30, 2017
sasmodels clean out existing kernels when changing compute engine Oct 31, 2018
.gitattributes attributes update Apr 7, 2017
.gitignore add note to preserve gauss 20, 76, and 150 to .gitignore Jan 16, 2018
.travis.yml suppress broken deploy so that travis tests will pass Jun 19, 2018
LICENSE.txt 80 columns for license file Oct 29, 2017
MANIFEST.in add manifest file for sdist build May 31, 2016
README.rst remove out of date magnetism note from README Oct 15, 2016
TESTS.txt Little reminder of how to use Paul K's model conversion tests (for when Mar 17, 2016
appveyor.yml remove restriction on pytest<4 Jan 31, 2018
compare.bat support compare/multi_compare on windows Nov 24, 2015
compare.sh Used output for pyopencl but commented it back Feb 18, 2016
conftest.py pytest: is_generator is not part of public api, so reimplement it in … Feb 7, 2018
deploy.sh back out attempted marketplace update fix Jan 16, 2018
multi_compare.bat support compare/multi_compare on windows Nov 24, 2015
multi_compare.sh 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 send sys.argv to main() Sep 12, 2016
sesansdemo.py add sesans support to bumps model Feb 18, 2015
setup.py adding requiresments to setup.py Oct 24, 2018

README.rst

Sasmodels

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.

Example

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/run.py fit.py \
    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 fit.py cylinder --preview

The fit.py 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".

Notes

cylinder.c + cylinder.py is the cylinder model with renamed variables and sld scaled by 1e6 so the numbers are nicer. The model name is "cylinder"

lamellar.py is an example of a single file model with embedded C code.

TravisStatus