espm


Nameespm JSON
Version 1.1.3 PyPI version JSON
download
home_pageNone
SummaryElectron SPectro-Microscopy Python Library
upload_time2025-02-06 13:41:20
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseCopyright 2022-2023 Adrien Teurtrie and Nathanael Perraudin Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
keywords python data analysis microscopy electron microscopy energy-dispersive x-ray spectroscopy x-ray energy-dispersive spectroscopy eds edx stem
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            espm: The Electron Spectro-Microscopy Python Library
=====================================================

.. image:: https://readthedocs.org/projects/espm/badge/?version=latest
    :target: https://espm.readthedocs.io/en/latest/?badge=latest
    :alt: Documentation Status

The espm package is designed for simulation and physics-guided NMF decomposition of hyperspectral data.
Even though the package is mainly centered around electron spectro-microscopy applications, custom models can be implemented for other type of data.
Currently espm supports the simulation and analysis of simultaneous scanning transmission electron microscopy and energy dispersive X-ray spectroscopy (STEM / EDXS). 
In future implementation, we will try to extend the package to support electron energy loss spectroscopy (EELS).

This library is integrated as much as possible in the `hyperspy <https://hyperspy.org>` and `scikit-learn <https://scikit-learn.org>` frameworks.

The main components of the package are:
- The simulation of STEM-EDXS datasets using `espm.datasets` which combines `espm.weights` for the simulation of spatial distributions and `espm.models` for the simulation of spectra.
- The hyperspectral unmixing of STEM-EDXS spectrum images using `espm.estimators`. This module contains algorithms to perform non-negative matrix factorization with diverse regularisation (e.g. Laplacian or L1) and contraints (e.g. simplex).
- The `espm.models` module can also be used to perform a physics-guided decomposition of STEM-EDXS datasets.

Installation
------------

You can install this package from PyPi using::

    $ pip install espm

If you want to develop, please use the option::

    $ git clone https://github.com/adriente/espm.git
    $ cd espm
    $ pip install cython
    $ pip install -e .[dev] 

If you get issues regarding pandoc when using `make doc`, you can install it using::

    $ sudo apt-get install pandoc

or::
    
    $ conda install pandoc

Recommended Installation
------------------------

We recommend to install the package in a virtual environment using conda::

    $ conda create -n espm python=3.11
    $ conda activate espm
    $ pip install espm
    $ conda install jupyterlab

It is especially useful for the interactive plotting in the notebooks.

Getting started
---------------
Try the api.ipynb notebook in the `notebooks` folder.


Documentation
-------------

The documentation is available at https://espm.readthedocs.io/en/latest/

You can get started with the following notebooks:

* Simulate STEM-EDXS data : https://espm.readthedocs.io/en/latest/introduction/notebooks/generate_data.ipynb
* Physics-guided decomposition (ESpM-NMF) STEM-EDXS data : https://espm.readthedocs.io/en/latest/introduction/notebooks/api.html
* Tests of the ESpM-NMF with a toy dataset : https://espm.readthedocs.io/en/latest/introduction/notebooks/toy-problem.html

CITING
------

If you use this library, please cite on of the following papers::

    @article{teurtrie2023espm,
    title={espm: A Python library for the simulation of STEM-EDXS datasets},
    author={Teurtrie, Adrien and Perraudin, Nathana{\"e}l and Holvoet, Thomas and Chen, Hui and Alexander, Duncan TL and Obozinski, Guillaume and H{\'e}bert, C{\'e}cile},
    journal={Ultramicroscopy},
    pages={113719},
    year={2023},
    publisher={Elsevier}
    }

    @article{Teurtrie_2024,
    doi = {10.1088/2632-2153/ad9192},
    year = {2024},
    month = {nov},
    publisher = {IOP Publishing},
    volume = {5},
    number = {4},
    pages = {045050},
    author = {Teurtrie, Adrien and Perraudin, Nathanaël and Holvoet, Thomas and Chen, Hui and Alexander, Duncan T L and Obozinski, Guillaume and Hébert, Cécile},
    title = {From STEM-EDXS data to phase separation and quantification using physics-guided NMF},
    journal = {Machine Learning: Science and Technology}
    }

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "espm",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "python, data analysis, microscopy, electron microscopy, energy-dispersive X-ray spectroscopy, X-ray energy-dispersive spectroscopy, EDS, EDX, STEM",
    "author": null,
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/fe/e9/e19de8fa854d5cb005e1cdfb13dcb47db946efbb1e0f00dc3a11128b90da/espm-1.1.3.tar.gz",
    "platform": null,
    "description": "espm: The Electron Spectro-Microscopy Python Library\r\n=====================================================\r\n\r\n.. image:: https://readthedocs.org/projects/espm/badge/?version=latest\r\n    :target: https://espm.readthedocs.io/en/latest/?badge=latest\r\n    :alt: Documentation Status\r\n\r\nThe espm package is designed for simulation and physics-guided NMF decomposition of hyperspectral data.\r\nEven though the package is mainly centered around electron spectro-microscopy applications, custom models can be implemented for other type of data.\r\nCurrently espm supports the simulation and analysis of simultaneous scanning transmission electron microscopy and energy dispersive X-ray spectroscopy (STEM / EDXS). \r\nIn future implementation, we will try to extend the package to support electron energy loss spectroscopy (EELS).\r\n\r\nThis library is integrated as much as possible in the `hyperspy <https://hyperspy.org>` and `scikit-learn <https://scikit-learn.org>` frameworks.\r\n\r\nThe main components of the package are:\r\n- The simulation of STEM-EDXS datasets using `espm.datasets` which combines `espm.weights` for the simulation of spatial distributions and `espm.models` for the simulation of spectra.\r\n- The hyperspectral unmixing of STEM-EDXS spectrum images using `espm.estimators`. This module contains algorithms to perform non-negative matrix factorization with diverse regularisation (e.g. Laplacian or L1) and contraints (e.g. simplex).\r\n- The `espm.models` module can also be used to perform a physics-guided decomposition of STEM-EDXS datasets.\r\n\r\nInstallation\r\n------------\r\n\r\nYou can install this package from PyPi using::\r\n\r\n    $ pip install espm\r\n\r\nIf you want to develop, please use the option::\r\n\r\n    $ git clone https://github.com/adriente/espm.git\r\n    $ cd espm\r\n    $ pip install cython\r\n    $ pip install -e .[dev] \r\n\r\nIf you get issues regarding pandoc when using `make doc`, you can install it using::\r\n\r\n    $ sudo apt-get install pandoc\r\n\r\nor::\r\n    \r\n    $ conda install pandoc\r\n\r\nRecommended Installation\r\n------------------------\r\n\r\nWe recommend to install the package in a virtual environment using conda::\r\n\r\n    $ conda create -n espm python=3.11\r\n    $ conda activate espm\r\n    $ pip install espm\r\n    $ conda install jupyterlab\r\n\r\nIt is especially useful for the interactive plotting in the notebooks.\r\n\r\nGetting started\r\n---------------\r\nTry the api.ipynb notebook in the `notebooks` folder.\r\n\r\n\r\nDocumentation\r\n-------------\r\n\r\nThe documentation is available at https://espm.readthedocs.io/en/latest/\r\n\r\nYou can get started with the following notebooks:\r\n\r\n* Simulate STEM-EDXS data : https://espm.readthedocs.io/en/latest/introduction/notebooks/generate_data.ipynb\r\n* Physics-guided decomposition (ESpM-NMF) STEM-EDXS data : https://espm.readthedocs.io/en/latest/introduction/notebooks/api.html\r\n* Tests of the ESpM-NMF with a toy dataset : https://espm.readthedocs.io/en/latest/introduction/notebooks/toy-problem.html\r\n\r\nCITING\r\n------\r\n\r\nIf you use this library, please cite on of the following papers::\r\n\r\n    @article{teurtrie2023espm,\r\n    title={espm: A Python library for the simulation of STEM-EDXS datasets},\r\n    author={Teurtrie, Adrien and Perraudin, Nathana{\\\"e}l and Holvoet, Thomas and Chen, Hui and Alexander, Duncan TL and Obozinski, Guillaume and H{\\'e}bert, C{\\'e}cile},\r\n    journal={Ultramicroscopy},\r\n    pages={113719},\r\n    year={2023},\r\n    publisher={Elsevier}\r\n    }\r\n\r\n    @article{Teurtrie_2024,\r\n    doi = {10.1088/2632-2153/ad9192},\r\n    year = {2024},\r\n    month = {nov},\r\n    publisher = {IOP Publishing},\r\n    volume = {5},\r\n    number = {4},\r\n    pages = {045050},\r\n    author = {Teurtrie, Adrien and Perraudin, Nathana\u00ebl and Holvoet, Thomas and Chen, Hui and Alexander, Duncan T L and Obozinski, Guillaume and H\u00e9bert, C\u00e9cile},\r\n    title = {From STEM-EDXS data to phase separation and quantification using physics-guided NMF},\r\n    journal = {Machine Learning: Science and Technology}\r\n    }\r\n",
    "bugtrack_url": null,
    "license": "Copyright 2022-2023 Adrien Teurtrie and Nathanael Perraudin\r\n        \r\n        Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:\r\n        \r\n        The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.\r\n        \r\n        THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
    "summary": "Electron SPectro-Microscopy Python Library",
    "version": "1.1.3",
    "project_urls": {
        "Bug Reports": "https://github.com/adriente/espm/issues",
        "Homepage": "https://espm.readthedocs.io/en/latest/",
        "Source": "https://github.com/adriente/espm"
    },
    "split_keywords": [
        "python",
        " data analysis",
        " microscopy",
        " electron microscopy",
        " energy-dispersive x-ray spectroscopy",
        " x-ray energy-dispersive spectroscopy",
        " eds",
        " edx",
        " stem"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "d0c5d02c4508bc4828a38aaf3407b969a202b956aeadf9e3047ba3a87857ca51",
                "md5": "987685cc601ba25bebef2996f8734014",
                "sha256": "4fb78fd4e3082874bb6ebea50e5c93dac933099108922fdf27005aefef8929d2"
            },
            "downloads": -1,
            "filename": "espm-1.1.3-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "987685cc601ba25bebef2996f8734014",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 353356,
            "upload_time": "2025-02-06T13:41:18",
            "upload_time_iso_8601": "2025-02-06T13:41:18.195164Z",
            "url": "https://files.pythonhosted.org/packages/d0/c5/d02c4508bc4828a38aaf3407b969a202b956aeadf9e3047ba3a87857ca51/espm-1.1.3-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "fee9e19de8fa854d5cb005e1cdfb13dcb47db946efbb1e0f00dc3a11128b90da",
                "md5": "b4348960f94bac19dcdd205436bfc680",
                "sha256": "1a41e45e6bb916761b0821b195be7b79e4dc7fe3d52e546880046b5fb12b0826"
            },
            "downloads": -1,
            "filename": "espm-1.1.3.tar.gz",
            "has_sig": false,
            "md5_digest": "b4348960f94bac19dcdd205436bfc680",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 5734920,
            "upload_time": "2025-02-06T13:41:20",
            "upload_time_iso_8601": "2025-02-06T13:41:20.741284Z",
            "url": "https://files.pythonhosted.org/packages/fe/e9/e19de8fa854d5cb005e1cdfb13dcb47db946efbb1e0f00dc3a11128b90da/espm-1.1.3.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-06 13:41:20",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "adriente",
    "github_project": "espm",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "espm"
}
        
Elapsed time: 6.95476s