sasmodels


Namesasmodels JSON
Version 1.0.7 PyPI version JSON
download
home_pagehttp://www.sasview.org
Summarysasmodels package
upload_time2023-03-24 09:39:22
maintainer
docs_urlNone
authorSasView Collaboration
requires_python
license
keywords small-angle x-ray and neutron scattering analysis
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
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": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "small-angle x-ray and neutron scattering analysis",
    "author": "SasView Collaboration",
    "author_email": "management@sasview.org",
    "download_url": "https://files.pythonhosted.org/packages/d8/cd/d3104aa1b5054b069ecd3f70347b327bb30be6ce2d9c4a76c9c9674424c7/sasmodels-1.0.7.tar.gz",
    "platform": null,
    "description": "Sasmodels\n=========\n\nTheory models for small angle scattering.\n\nThe models provided are usable directly in the bumps fitting package and\nin the sasview analysis package.  If OpenCL is available, the models will\nrun much faster.  If not, then precompiled versions will be included with\nthe distributed package.  New models can be added if OpenCL or a C compiler\nis available.\n\nInstall\n-------\n\nThe easiest way to use sasmodels is from `SasView <http://www.sasview.org/>`_.\n\nYou can also install sasmodels as a standalone package in python. Use\n`miniconda <https://docs.conda.io/en/latest/miniconda.html>`_\nor `anaconda <https://www.anaconda.com/>`_\nto create a python environment with the sasmodels dependencies::\n\n    $ conda create -n sasmodels -c conda-forge numpy scipy matplotlib pyopencl\n\nThe option ``-n sasmodels`` names the environment sasmodels, and the option\n``-c conda-forge`` selects the conda-forge package channel because pyopencl\nis not part of the base anaconda distribution.\n\nActivate the environment and install sasmodels::\n\n    $ conda activate sasmodels\n    (sasmodels) $ pip install sasmodels\n\nInstall `bumps <https://github.com/bumps/bumps>`_ if you want to use it to fit\nyour data::\n\n    (sasmodels) $ pip install bumps\n\nUsage\n-----\n\nCheck that the works::\n\n    (sasmodels) $ python -m sasmodels.compare cylinder\n\nTo show the orientation explorer::\n\n    (sasmodels) $ python -m sasmodels.jitter\n\nDocumentation is available online as part of the SasView\n`fitting perspective <http://www.sasview.org/docs/index.html>`_\nas well as separate pages for\n`individual models <http://www.sasview.org/docs/user/sasgui/perspectives/fitting/models/index.html>`_.\nProgramming details for sasmodels are available in the\n`developer documentation <http://www.sasview.org/docs/dev/dev.html>`_.\n\n\nFitting Example\n---------------\n\nThe example directory contains a radial+tangential data set for an oriented\nrod-like shape.\n\nTo load the example data, you will need the SAS data loader from the sasview\npackage. This is not yet available on PyPI, so you will need a copy of the\nSasView source code to run it.  Create a directory somewhere to hold the\nsasview and sasmodels source code, which we will refer to as $SOURCE.\n\nUse the following to install sasview, and the sasmodels examples::\n\n    (sasmodels) $ cd $SOURCE\n    (sasmodels) $ conda install git\n    (sasmodels) $ git clone https://github.com/sasview/sasview.git\n    (sasmodels) $ git clone https://github.com/sasview/sasmodels.git\n\nSet the path to the sasview source on your python path within the sasmodels\nenvironment.  On Windows, this will be::\n\n    (sasmodels)> set PYTHONPATH=\"$SOURCE\\sasview\\src\"\n    (sasmodels)> cd $SOURCE/sasmodels/example\n    (sasmodels)> python -m bumps.cli fit.py cylinder --preview\n\nOn Mac/Linux with the standard shell this will be::\n\n    (sasmodels) $ export PYTHONPATH=\"$SOURCE/sasview/src\"\n    (sasmodels) $ cd $SOURCE/sasmodels/example\n    (sasmodels) $ bumps fit.py cylinder --preview\n\nThe fit.py model accepts up to two arguments.  The first argument is the\nmodel type, which has been defined for cylinder, capped_cylinder,\ncore_shell_cylinder, ellipsoid, triaxial_ellipsoid and lamellar.  The\nsecond argument is view, which can be radial or tangential.  To fit\nboth radial and tangential simultaneously, use the word \"both\".\n\nSee `bumps documentation <https://bumps.readthedocs.io/>`_ for detailed\ninstructions on running the fit.\n\n|TestStatus|_ |TravisStatus|_\n\n.. |TestStatus| image:: https://github.com/SasView/sasmodels/workflows/Test/badge.svg?branch=master\n.. _TestStatus: https://github.com/SasView/sasmodels/actions?query=workflow%3ATest+branch%3Amaster\n\n.. |TravisStatus| image:: https://travis-ci.org/SasView/sasmodels.svg?branch=master\n.. _TravisStatus: https://travis-ci.org/SasView/sasmodels\n\n\n",
    "bugtrack_url": null,
    "license": "",
    "summary": "sasmodels package",
    "version": "1.0.7",
    "split_keywords": [
        "small-angle",
        "x-ray",
        "and",
        "neutron",
        "scattering",
        "analysis"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8ed8c558734fabc6f096111591e0ccb9a09c2070df21494aac18336217a30918",
                "md5": "925ad24daa241421bd4e3d6494d1e262",
                "sha256": "5e8f867043adba5ddbc7bc7330fc8bb1824927e8a7e68143e3fb165880f73586"
            },
            "downloads": -1,
            "filename": "sasmodels-1.0.7-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "925ad24daa241421bd4e3d6494d1e262",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 535362,
            "upload_time": "2023-03-24T09:39:19",
            "upload_time_iso_8601": "2023-03-24T09:39:19.904959Z",
            "url": "https://files.pythonhosted.org/packages/8e/d8/c558734fabc6f096111591e0ccb9a09c2070df21494aac18336217a30918/sasmodels-1.0.7-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d8cdd3104aa1b5054b069ecd3f70347b327bb30be6ce2d9c4a76c9c9674424c7",
                "md5": "a99602a13cd839412bc2879177773249",
                "sha256": "ac9127c525b88f9731cd325b05c21f29f45371ba31095df8e207fd56553124c0"
            },
            "downloads": -1,
            "filename": "sasmodels-1.0.7.tar.gz",
            "has_sig": false,
            "md5_digest": "a99602a13cd839412bc2879177773249",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 2116337,
            "upload_time": "2023-03-24T09:39:22",
            "upload_time_iso_8601": "2023-03-24T09:39:22.509754Z",
            "url": "https://files.pythonhosted.org/packages/d8/cd/d3104aa1b5054b069ecd3f70347b327bb30be6ce2d9c4a76c9c9674424c7/sasmodels-1.0.7.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-24 09:39:22",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "lcname": "sasmodels"
}
        
Elapsed time: 0.04748s