sasmodels


Namesasmodels JSON
Version 1.0.8 PyPI version JSON
download
home_pagehttp://www.sasview.org
Summarysasmodels package
upload_time2024-09-26 19:34:11
maintainerNone
docs_urlNone
authorSasView Collaboration
requires_pythonNone
licenseNone
keywords small-angle x-ray and neutron scattering analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI
coveralls test coverage No coveralls.
            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.

Install
-------

The easiest way to use sasmodels is from `SasView <http://www.sasview.org/>`_.

You can also install sasmodels as a standalone package in python. Use
`miniconda <https://docs.conda.io/en/latest/miniconda.html>`_
or `anaconda <https://www.anaconda.com/>`_
to create a python environment with the sasmodels dependencies::

    $ conda create -n sasmodels -c conda-forge numpy scipy matplotlib pyopencl

The option ``-n sasmodels`` names the environment sasmodels, and the option
``-c conda-forge`` selects the conda-forge package channel because pyopencl
is not part of the base anaconda distribution.

Activate the environment and install sasmodels::

    $ conda activate sasmodels
    (sasmodels) $ pip install sasmodels

Install `bumps <https://github.com/bumps/bumps>`_ if you want to use it to fit
your data::

    (sasmodels) $ pip install bumps

Usage
-----

Check that the works::

    (sasmodels) $ python -m sasmodels.compare cylinder

To show the orientation explorer::

    (sasmodels) $ python -m sasmodels.jitter

Documentation is available online as part of the SasView
`fitting perspective <http://www.sasview.org/docs/index.html>`_
as well as separate pages for
`individual models <http://www.sasview.org/docs/user/sasgui/perspectives/fitting/models/index.html>`_.
Programming details for sasmodels are available in the
`developer documentation <http://www.sasview.org/docs/dev/dev.html>`_.


Fitting Example
---------------

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

To load the example data, you will need the SAS data loader from the sasview
package. This is not yet available on PyPI, so you will need a copy of the
SasView source code to run it.  Create a directory somewhere to hold the
sasview and sasmodels source code, which we will refer to as $SOURCE.

Use the following to install sasview, and the sasmodels examples::

    (sasmodels) $ cd $SOURCE
    (sasmodels) $ conda install git
    (sasmodels) $ git clone https://github.com/sasview/sasview.git
    (sasmodels) $ git clone https://github.com/sasview/sasmodels.git

Set the path to the sasview source on your python path within the sasmodels
environment.  On Windows, this will be::

    (sasmodels)> set PYTHONPATH="$SOURCE\sasview\src"
    (sasmodels)> cd $SOURCE/sasmodels/example
    (sasmodels)> python -m bumps.cli fit.py cylinder --preview

On Mac/Linux with the standard shell this will be::

    (sasmodels) $ export PYTHONPATH="$SOURCE/sasview/src"
    (sasmodels) $ cd $SOURCE/sasmodels/example
    (sasmodels) $ 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".

See `bumps documentation <https://bumps.readthedocs.io/>`_ for detailed
instructions on running the fit.

|TestStatus|_ |TravisStatus|_

.. |TestStatus| image:: https://github.com/SasView/sasmodels/workflows/Test/badge.svg?branch=master
.. _TestStatus: https://github.com/SasView/sasmodels/actions?query=workflow%3ATest+branch%3Amaster

.. |TravisStatus| image:: https://travis-ci.org/SasView/sasmodels.svg?branch=master
.. _TravisStatus: https://travis-ci.org/SasView/sasmodels

            

Raw data

            {
    "_id": null,
    "home_page": "http://www.sasview.org",
    "name": "sasmodels",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "small-angle x-ray and neutron scattering analysis",
    "author": "SasView Collaboration",
    "author_email": "management@sasview.org",
    "download_url": "https://files.pythonhosted.org/packages/12/cd/bd39ded7fd55bde86b5e054c0c931bc65c4c006ddff2ea55f5f250f72c15/sasmodels-1.0.8.tar.gz",
    "platform": null,
    "description": "Sasmodels\r\n=========\r\n\r\nTheory models for small angle scattering.\r\n\r\nThe models provided are usable directly in the bumps fitting package and\r\nin the sasview analysis package.  If OpenCL is available, the models will\r\nrun much faster.  If not, then precompiled versions will be included with\r\nthe distributed package.  New models can be added if OpenCL or a C compiler\r\nis available.\r\n\r\nInstall\r\n-------\r\n\r\nThe easiest way to use sasmodels is from `SasView <http://www.sasview.org/>`_.\r\n\r\nYou can also install sasmodels as a standalone package in python. Use\r\n`miniconda <https://docs.conda.io/en/latest/miniconda.html>`_\r\nor `anaconda <https://www.anaconda.com/>`_\r\nto create a python environment with the sasmodels dependencies::\r\n\r\n    $ conda create -n sasmodels -c conda-forge numpy scipy matplotlib pyopencl\r\n\r\nThe option ``-n sasmodels`` names the environment sasmodels, and the option\r\n``-c conda-forge`` selects the conda-forge package channel because pyopencl\r\nis not part of the base anaconda distribution.\r\n\r\nActivate the environment and install sasmodels::\r\n\r\n    $ conda activate sasmodels\r\n    (sasmodels) $ pip install sasmodels\r\n\r\nInstall `bumps <https://github.com/bumps/bumps>`_ if you want to use it to fit\r\nyour data::\r\n\r\n    (sasmodels) $ pip install bumps\r\n\r\nUsage\r\n-----\r\n\r\nCheck that the works::\r\n\r\n    (sasmodels) $ python -m sasmodels.compare cylinder\r\n\r\nTo show the orientation explorer::\r\n\r\n    (sasmodels) $ python -m sasmodels.jitter\r\n\r\nDocumentation is available online as part of the SasView\r\n`fitting perspective <http://www.sasview.org/docs/index.html>`_\r\nas well as separate pages for\r\n`individual models <http://www.sasview.org/docs/user/sasgui/perspectives/fitting/models/index.html>`_.\r\nProgramming details for sasmodels are available in the\r\n`developer documentation <http://www.sasview.org/docs/dev/dev.html>`_.\r\n\r\n\r\nFitting Example\r\n---------------\r\n\r\nThe example directory contains a radial+tangential data set for an oriented\r\nrod-like shape.\r\n\r\nTo load the example data, you will need the SAS data loader from the sasview\r\npackage. This is not yet available on PyPI, so you will need a copy of the\r\nSasView source code to run it.  Create a directory somewhere to hold the\r\nsasview and sasmodels source code, which we will refer to as $SOURCE.\r\n\r\nUse the following to install sasview, and the sasmodels examples::\r\n\r\n    (sasmodels) $ cd $SOURCE\r\n    (sasmodels) $ conda install git\r\n    (sasmodels) $ git clone https://github.com/sasview/sasview.git\r\n    (sasmodels) $ git clone https://github.com/sasview/sasmodels.git\r\n\r\nSet the path to the sasview source on your python path within the sasmodels\r\nenvironment.  On Windows, this will be::\r\n\r\n    (sasmodels)> set PYTHONPATH=\"$SOURCE\\sasview\\src\"\r\n    (sasmodels)> cd $SOURCE/sasmodels/example\r\n    (sasmodels)> python -m bumps.cli fit.py cylinder --preview\r\n\r\nOn Mac/Linux with the standard shell this will be::\r\n\r\n    (sasmodels) $ export PYTHONPATH=\"$SOURCE/sasview/src\"\r\n    (sasmodels) $ cd $SOURCE/sasmodels/example\r\n    (sasmodels) $ bumps fit.py cylinder --preview\r\n\r\nThe fit.py model accepts up to two arguments.  The first argument is the\r\nmodel type, which has been defined for cylinder, capped_cylinder,\r\ncore_shell_cylinder, ellipsoid, triaxial_ellipsoid and lamellar.  The\r\nsecond argument is view, which can be radial or tangential.  To fit\r\nboth radial and tangential simultaneously, use the word \"both\".\r\n\r\nSee `bumps documentation <https://bumps.readthedocs.io/>`_ for detailed\r\ninstructions on running the fit.\r\n\r\n|TestStatus|_ |TravisStatus|_\r\n\r\n.. |TestStatus| image:: https://github.com/SasView/sasmodels/workflows/Test/badge.svg?branch=master\r\n.. _TestStatus: https://github.com/SasView/sasmodels/actions?query=workflow%3ATest+branch%3Amaster\r\n\r\n.. |TravisStatus| image:: https://travis-ci.org/SasView/sasmodels.svg?branch=master\r\n.. _TravisStatus: https://travis-ci.org/SasView/sasmodels\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "sasmodels package",
    "version": "1.0.8",
    "project_urls": {
        "Download": "https://github.com/SasView/sasmodels",
        "Homepage": "http://www.sasview.org"
    },
    "split_keywords": [
        "small-angle",
        "x-ray",
        "and",
        "neutron",
        "scattering",
        "analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "cb409f1e9dfb78261b7b8660dc07aec6865a8ad1cc8fad117b9b8b2be66afbe5",
                "md5": "c231f398ae9ffbdabc68f40636ed57d1",
                "sha256": "2e1c26d86d097262f9a806c33f66d2cefb0fd06edd94cc795cb54462b011065f"
            },
            "downloads": -1,
            "filename": "sasmodels-1.0.8-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "c231f398ae9ffbdabc68f40636ed57d1",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 550563,
            "upload_time": "2024-09-26T19:34:08",
            "upload_time_iso_8601": "2024-09-26T19:34:08.298061Z",
            "url": "https://files.pythonhosted.org/packages/cb/40/9f1e9dfb78261b7b8660dc07aec6865a8ad1cc8fad117b9b8b2be66afbe5/sasmodels-1.0.8-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "12cdbd39ded7fd55bde86b5e054c0c931bc65c4c006ddff2ea55f5f250f72c15",
                "md5": "5543849ed2c2870c299fd18713181884",
                "sha256": "96bc2679492a1f8df9fc7907e0fe12bb3a9224caa652b13b8b941b2a71d5d4ef"
            },
            "downloads": -1,
            "filename": "sasmodels-1.0.8.tar.gz",
            "has_sig": false,
            "md5_digest": "5543849ed2c2870c299fd18713181884",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10914616,
            "upload_time": "2024-09-26T19:34:11",
            "upload_time_iso_8601": "2024-09-26T19:34:11.821072Z",
            "url": "https://files.pythonhosted.org/packages/12/cd/bd39ded7fd55bde86b5e054c0c931bc65c4c006ddff2ea55f5f250f72c15/sasmodels-1.0.8.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-26 19:34:11",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SasView",
    "github_project": "sasmodels",
    "travis_ci": true,
    "coveralls": false,
    "github_actions": true,
    "lcname": "sasmodels"
}
        
Elapsed time: 0.31726s