ramanspy


Nameramanspy JSON
Version 0.2.9 PyPI version JSON
download
home_pageNone
SummaryRamanSPy: An open-source Python package for integrative Raman spectroscopy data analysis
upload_time2024-04-07 09:16:36
maintainerNone
docs_urlNone
authorNone
requires_python>=3.8
licenseBSD 3-Clause License Copyright (c) 2023, Dimitar Georgiev Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
keywords raman spectroscopy spectral analysis chemometrics preprocessing pipeline artificial intelligence machine learning python package
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # RamanSPy

[![Downloads](https://static.pepy.tech/badge/ramanspy)](https://pepy.tech/project/ramanspy)   [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)]([https://github.com/dwyl/esta/issues](https://github.com/barahona-research-group/RamanSPy/issues))


*RamanSPy* is an open-source Python package for integrative
Raman spectroscopy data analysis.

## Key features

- Common data format
- Data loaders
- Preprocessing methods
- Preprocessing pipelining
- Preprocessing protocols
- Analysis methods
- Visualisation tools
- AI integration
- Datasets
- Metrics
- Synthetic data generator (***new in versions >= 0.2.0***)
  

## Installation

*RamanSPy* has been published on PyPI and can be installed
via pip:

``` console
pip install ramanspy
```

## Code example

Below is a simple example of how *RamanSPy* can be used to
load, preprocess and analyse Raman spectroscopic data. Here, we load a
data file from a commercial Raman instrument; apply a preprocessing
pipeline consisting of spectral cropping, cosmic ray removal, denoising,
baseline correction and normalisation; perform spectral unmixing; and
visualise the results.

``` 
import ramanspy as rp

# load data
image_data = rp.load.witec("<PATH>")

# apply a preprocessing pipeline
pipeline = rp.preprocessing.Pipeline([
    rp.preprocessing.misc.Cropper(region=(700, 1800)),
    rp.preprocessing.despike.WhitakerHayes(),
    rp.preprocessing.denoise.SavGol(window_length=9, polyorder=3),
    rp.preprocessing.baseline.ASPLS(),
    rp.preprocessing.normalise.MinMax()
])
data = pipeline.apply(image_data)

# perform spectral unmixing
nfindr = rp.analysis.unmix.NFINDR(n_endmembers=5)
amaps, endmembers = nfindr.apply(data)

# plot results
rp.plot.spectra(endmembers)
rp.plot.image(amaps)
rp.plot.show()
```

## Documentation

For more information about the functionalities of the package, refer to
the [documentation](https://ramanspy.readthedocs.io).

## Credits

If you use this package for your research, please cite our paper:

[Georgiev, D., Pedersen, S., Xie, R., Fernández-Galiana, Á., Stevens, M., & Barahona, M. (2023). RamanSPy: An open-source Python package for integrative Raman spectroscopy data analysis. ChemRxiv. doi:10.26434/chemrxiv-2023-m3xlm](https://chemrxiv.org/engage/chemrxiv/article-details/64a53861ba3e99daef8c9c51)

```bibtex
@article{ramanspy_2023,
    title={RamanSPy: An open-source Python package for integrative Raman spectroscopy data analysis},
    author={Georgiev, Dimitar and Pedersen, Simon Vilms and Xie, Ruoxiao and Fernández-Galiana, Álvaro and Stevens, Molly M. and Barahona, Mauricio},
    journal={ChemRxiv},
    publisher={Cambridge Open Engage},
    year={2023},
    DOI={10.26434/chemrxiv-2023-m3xlm}
}
```

Also, if you find *RamanSPy* useful, please consider leaving a star on [GitHub](https://github.com/barahona-research-group/RamanSPy).

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "ramanspy",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": "Raman spectroscopy, spectral analysis, chemometrics, preprocessing pipeline, artificial intelligence, machine learning, Python package",
    "author": null,
    "author_email": "Dimitar Georgiev <d.georgiev21@imperial.ac.uk>",
    "download_url": "https://files.pythonhosted.org/packages/06/d5/d5bf921a11886ef458609cff2217b4a2bbbb1aae1fef03bf0e1cd60667fb/ramanspy-0.2.9.tar.gz",
    "platform": null,
    "description": "# RamanSPy\n\n[![Downloads](https://static.pepy.tech/badge/ramanspy)](https://pepy.tech/project/ramanspy)   [![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)]([https://github.com/dwyl/esta/issues](https://github.com/barahona-research-group/RamanSPy/issues))\n\n\n*RamanSPy* is an open-source Python package for integrative\nRaman spectroscopy data analysis.\n\n## Key features\n\n- Common data format\n- Data loaders\n- Preprocessing methods\n- Preprocessing pipelining\n- Preprocessing protocols\n- Analysis methods\n- Visualisation tools\n- AI integration\n- Datasets\n- Metrics\n- Synthetic data generator (***new in versions >= 0.2.0***)\n  \n\n## Installation\n\n*RamanSPy* has been published on PyPI and can be installed\nvia pip:\n\n``` console\npip install ramanspy\n```\n\n## Code example\n\nBelow is a simple example of how *RamanSPy* can be used to\nload, preprocess and analyse Raman spectroscopic data. Here, we load a\ndata file from a commercial Raman instrument; apply a preprocessing\npipeline consisting of spectral cropping, cosmic ray removal, denoising,\nbaseline correction and normalisation; perform spectral unmixing; and\nvisualise the results.\n\n``` \nimport ramanspy as rp\n\n# load data\nimage_data = rp.load.witec(\"<PATH>\")\n\n# apply a preprocessing pipeline\npipeline = rp.preprocessing.Pipeline([\n    rp.preprocessing.misc.Cropper(region=(700, 1800)),\n    rp.preprocessing.despike.WhitakerHayes(),\n    rp.preprocessing.denoise.SavGol(window_length=9, polyorder=3),\n    rp.preprocessing.baseline.ASPLS(),\n    rp.preprocessing.normalise.MinMax()\n])\ndata = pipeline.apply(image_data)\n\n# perform spectral unmixing\nnfindr = rp.analysis.unmix.NFINDR(n_endmembers=5)\namaps, endmembers = nfindr.apply(data)\n\n# plot results\nrp.plot.spectra(endmembers)\nrp.plot.image(amaps)\nrp.plot.show()\n```\n\n## Documentation\n\nFor more information about the functionalities of the package, refer to\nthe [documentation](https://ramanspy.readthedocs.io).\n\n## Credits\n\nIf you use this package for your research, please cite our paper:\n\n[Georgiev, D., Pedersen, S., Xie, R., Fern\u00e1ndez-Galiana, \u00c1., Stevens, M., & Barahona, M. (2023). RamanSPy: An open-source Python package for integrative Raman spectroscopy data analysis. ChemRxiv. doi:10.26434/chemrxiv-2023-m3xlm](https://chemrxiv.org/engage/chemrxiv/article-details/64a53861ba3e99daef8c9c51)\n\n```bibtex\n@article{ramanspy_2023,\n    title={RamanSPy: An open-source Python package for integrative Raman spectroscopy data analysis},\n    author={Georgiev, Dimitar and Pedersen, Simon Vilms and Xie, Ruoxiao and Fern\u00e1ndez-Galiana, \u00c1lvaro and Stevens, Molly M. and Barahona, Mauricio},\n    journal={ChemRxiv},\n    publisher={Cambridge Open Engage},\n    year={2023},\n    DOI={10.26434/chemrxiv-2023-m3xlm}\n}\n```\n\nAlso, if you find *RamanSPy* useful, please consider leaving a star on [GitHub](https://github.com/barahona-research-group/RamanSPy).\n",
    "bugtrack_url": null,
    "license": "BSD 3-Clause License  Copyright (c) 2023, Dimitar Georgiev  Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.  3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ",
    "summary": "RamanSPy: An open-source Python package for integrative Raman spectroscopy data analysis",
    "version": "0.2.9",
    "project_urls": {
        "Documentation": "https://ramanspy.readthedocs.io",
        "Preprint": "https://chemrxiv.org/engage/chemrxiv/article-details/64a53861ba3e99daef8c9c51",
        "Source": "https://github.com/barahona-research-group/RamanSPy"
    },
    "split_keywords": [
        "raman spectroscopy",
        " spectral analysis",
        " chemometrics",
        " preprocessing pipeline",
        " artificial intelligence",
        " machine learning",
        " python package"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d8f59c168f63c6e18ea250ee6397adde4a08869f717fb6fb2451ef1871e5f74d",
                "md5": "14ae9b98ce5d641a6decb0b938723572",
                "sha256": "c02274b1998f0458b233d678b4bc87aa7630562f16f325be2bc592283be6fb97"
            },
            "downloads": -1,
            "filename": "ramanspy-0.2.9-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "14ae9b98ce5d641a6decb0b938723572",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 46798,
            "upload_time": "2024-04-07T09:16:34",
            "upload_time_iso_8601": "2024-04-07T09:16:34.496503Z",
            "url": "https://files.pythonhosted.org/packages/d8/f5/9c168f63c6e18ea250ee6397adde4a08869f717fb6fb2451ef1871e5f74d/ramanspy-0.2.9-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "06d5d5bf921a11886ef458609cff2217b4a2bbbb1aae1fef03bf0e1cd60667fb",
                "md5": "9b752de26d6bbfb059a72a166cdd8f36",
                "sha256": "45d6b55e4aa66bd5e31885254261dc3420872829e57d45634e484d4ae0f8be16"
            },
            "downloads": -1,
            "filename": "ramanspy-0.2.9.tar.gz",
            "has_sig": false,
            "md5_digest": "9b752de26d6bbfb059a72a166cdd8f36",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 40396,
            "upload_time": "2024-04-07T09:16:36",
            "upload_time_iso_8601": "2024-04-07T09:16:36.104691Z",
            "url": "https://files.pythonhosted.org/packages/06/d5/d5bf921a11886ef458609cff2217b4a2bbbb1aae1fef03bf0e1cd60667fb/ramanspy-0.2.9.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-07 09:16:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "barahona-research-group",
    "github_project": "RamanSPy",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "ramanspy"
}
        
Elapsed time: 0.27358s