mcalf


Namemcalf JSON
Version 1.0.0 PyPI version JSON
download
home_pagehttps://github.com/ConorMacBride/mcalf/
Summary"MCALF: Multi-Component Atmospheric Line Fitting"
upload_time2023-03-28 22:55:06
maintainer
docs_urlNone
authorConor MacBride
requires_python>=3.7
licenseBSD 2-Clause
keywords spectrum spectra fitting absorption emission voigt
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            ===============================================
MCALF: Multi-Component Atmospheric Line Fitting
===============================================

|Azure Pipelines Status| |Codecov| |PyPI Version| |Zenodo DOI| |Docs Status| |GitHub License|

MCALF is an open-source Python package for accurately constraining velocity
information from spectral imaging observations using machine learning
techniques.

This software package is intended to be used by solar physicists trying
to extract line-of-sight (LOS) Doppler velocity information from
spectral imaging observations (Stokes I measurements) of the Sun.
A ‘toolkit’ is provided that can be used to define a spectral model
optimised for a particular dataset.

This package is particularly suited for extracting velocity information
from spectral imaging observations where the individual spectra can
contain multiple spectral components.
Such multiple components are typically present when active solar phenomenon
occur within an isolated region of the solar disk.
Spectra within such a region will often have a large emission component
superimposed on top of the underlying absorption spectral profile from the
quiescent solar atmosphere.

A sample model is provided for an IBIS Ca II 8542 Å spectral imaging sunspot
dataset.
This dataset typically contains spectra with multiple atmospheric
components and this package supports the isolation of the individual
components such that velocity information can be constrained for each
component.
Using this sample model, as well as the separate base (template) model it is
built upon, a custom model can easily be built for a specific dataset.

The custom model can be designed to take into account the spectral shape of
each particular spectrum in the dataset.
By training a neural network classifier using a sample of spectra from the
dataset labelled with their spectral shapes, the spectral shape of any
spectrum in the dataset can be found.
The fitting algorithm can then be adjusted for each spectrum based on
the particular spectral shape the neural network assigned it.

This package is designed to run in parallel over large data cubes, as well
as in serial.
As each spectrum is processed in isolation, this package scales very well
across many processor cores.
Numerous functions are provided to plot the results in a clearly.
The MCALF API also contains many useful functions which have the potential
of being integrated into other Python packages.

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

For easier package management we recommend using `Miniconda`_ (or `Anaconda`_)
and creating a `new conda environment`_ to install MCALF inside.
To install MCALF using `Miniconda`_, run the following commands in your
system's command prompt, or if you are using Windows, in the
'Anaconda Prompt':

.. code:: bash

    $ conda config --add channels conda-forge
    $ conda config --set channel_priority strict
    $ conda install mcalf

MCALF is updated to the latest version by running:

.. code:: bash

    $ conda update mcalf

Alternatively, you can install MCALF using ``pip``:

.. code:: bash

    $ pip install mcalf

Testing
-------

A test suite is included with the package. The package is tested on
multiple platforms, however you may wish to run the tests on your
system also. More details on running our tox/pytest test suite are
available in our `documentation`_.

Getting Started
---------------

Documentation is `available here <https://mcalf.macbride.me/>`_.
Some examples are included `here <examples/>`_.

Contributing
------------

|Contributor Covenant|

If you find this package useful and have time to make it even better,
you are very welcome to contribute to this package, regardless of how much
prior experience you have.
Types of ways you can contribute include, expanding the documentation with
more use cases and examples, reporting bugs through the GitHub issue tracker,
reviewing pull requests and the existing code, fixing bugs and implementing new
features in the code.
You are encouraged to submit any `bug reports`_ and `pull requests`_ directly
to the `GitHub repository`_.

Please note that this project is released with a Contributor Code of Conduct.
By participating in this project you agree to abide by its terms.

Citation
--------

If you have used this package in work that leads to a publication, we would
be very grateful if you could acknowledge your use of this package in the
main text of the publication.
Please cite the following publications,

    MacBride CD, Jess DB. 2021
    MCALF: Multi-Component Atmospheric Line Fitting.
    *Journal of Open Source Software*. **6(61)**, 3265.
    (`doi:10.21105/joss.03265 <https://doi.org/10.21105/joss.03265>`_)

..

    MacBride CD, Jess DB, Grant SDT, Khomenko E, Keys PH, Stangalini M. 2020
    Accurately constraining velocity information from spectral imaging
    observations using machine learning techniques.
    *Philosophical Transactions of the Royal Society A*. **379**, 2190.
    (`doi:10.1098/rsta.2020.0171 <https://doi.org/10.1098/rsta.2020.0171>`_)

Please also cite the `Zenodo DOI`_ for the package version you used.
Please also consider integrating your code and examples into the package.

License
-------

MCALF is licensed under the terms of the BSD 2-Clause license.

.. |Azure Pipelines Status| image:: https://dev.azure.com/ConorMacBride/mcalf/_apis/build/status/ConorMacBride.mcalf?repoName=ConorMacBride%2Fmcalf&branchName=main
    :target: https://dev.azure.com/ConorMacBride/mcalf/_build/latest?definitionId=5&repoName=ConorMacBride%2Fmcalf&branchName=main
    :alt: Azure Pipelines
.. |Codecov| image:: https://codecov.io/gh/ConorMacBride/mcalf/branch/main/graph/badge.svg
    :target: https://codecov.io/gh/ConorMacBride/mcalf
    :alt: Codecov
.. |PyPI Version| image:: https://img.shields.io/pypi/v/mcalf
    :target: https://pypi.python.org/pypi/mcalf
    :alt: PyPI
.. |Zenodo DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3924527.svg
    :target: https://doi.org/10.5281/zenodo.3924527
    :alt: DOI
.. |Docs Status| image:: https://readthedocs.org/projects/mcalf/badge/?version=latest&style=flat
    :target: https://mcalf.macbride.me/
    :alt: Documentation
.. |GitHub License| image:: https://img.shields.io/github/license/ConorMacBride/mcalf
    :target: LICENSE.rst
    :alt: License
.. |Contributor Covenant| image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg
    :target: CODE_OF_CONDUCT.rst
    :alt: Code of Conduct

.. _Anaconda: https://www.anaconda.com/products/individual#Downloads
.. _Miniconda: https://docs.conda.io/en/latest/miniconda.html
.. _new conda environment: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html
.. _documentation: https://mcalf.macbride.me/en/latest/guide/index.html#testing

.. _bug reports: https://github.com/ConorMacBride/mcalf/issues
.. _pull requests: https://github.com/ConorMacBride/mcalf/pulls
.. _GitHub repository: https://github.com/ConorMacBride/mcalf

.. _Zenodo DOI: https://doi.org/10.5281/zenodo.3924527

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/ConorMacBride/mcalf/",
    "name": "mcalf",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.7",
    "maintainer_email": "",
    "keywords": "spectrum,spectra,fitting,absorption,emission,voigt",
    "author": "Conor MacBride",
    "author_email": "cmacbride01@qub.ac.uk",
    "download_url": "https://files.pythonhosted.org/packages/d9/3f/08e811f73630c8feb92069a8d80d4eb73b8e6efcecca053409b585f4a901/mcalf-1.0.0.tar.gz",
    "platform": null,
    "description": "===============================================\nMCALF: Multi-Component Atmospheric Line Fitting\n===============================================\n\n|Azure Pipelines Status| |Codecov| |PyPI Version| |Zenodo DOI| |Docs Status| |GitHub License|\n\nMCALF is an open-source Python package for accurately constraining velocity\ninformation from spectral imaging observations using machine learning\ntechniques.\n\nThis software package is intended to be used by solar physicists trying\nto extract line-of-sight (LOS) Doppler velocity information from\nspectral imaging observations (Stokes I measurements) of the Sun.\nA \u2018toolkit\u2019 is provided that can be used to define a spectral model\noptimised for a particular dataset.\n\nThis package is particularly suited for extracting velocity information\nfrom spectral imaging observations where the individual spectra can\ncontain multiple spectral components.\nSuch multiple components are typically present when active solar phenomenon\noccur within an isolated region of the solar disk.\nSpectra within such a region will often have a large emission component\nsuperimposed on top of the underlying absorption spectral profile from the\nquiescent solar atmosphere.\n\nA sample model is provided for an IBIS Ca II 8542 \u00c5 spectral imaging sunspot\ndataset.\nThis dataset typically contains spectra with multiple atmospheric\ncomponents and this package supports the isolation of the individual\ncomponents such that velocity information can be constrained for each\ncomponent.\nUsing this sample model, as well as the separate base (template) model it is\nbuilt upon, a custom model can easily be built for a specific dataset.\n\nThe custom model can be designed to take into account the spectral shape of\neach particular spectrum in the dataset.\nBy training a neural network classifier using a sample of spectra from the\ndataset labelled with their spectral shapes, the spectral shape of any\nspectrum in the dataset can be found.\nThe fitting algorithm can then be adjusted for each spectrum based on\nthe particular spectral shape the neural network assigned it.\n\nThis package is designed to run in parallel over large data cubes, as well\nas in serial.\nAs each spectrum is processed in isolation, this package scales very well\nacross many processor cores.\nNumerous functions are provided to plot the results in a clearly.\nThe MCALF API also contains many useful functions which have the potential\nof being integrated into other Python packages.\n\nInstallation\n------------\n\nFor easier package management we recommend using `Miniconda`_ (or `Anaconda`_)\nand creating a `new conda environment`_ to install MCALF inside.\nTo install MCALF using `Miniconda`_, run the following commands in your\nsystem's command prompt, or if you are using Windows, in the\n'Anaconda Prompt':\n\n.. code:: bash\n\n    $ conda config --add channels conda-forge\n    $ conda config --set channel_priority strict\n    $ conda install mcalf\n\nMCALF is updated to the latest version by running:\n\n.. code:: bash\n\n    $ conda update mcalf\n\nAlternatively, you can install MCALF using ``pip``:\n\n.. code:: bash\n\n    $ pip install mcalf\n\nTesting\n-------\n\nA test suite is included with the package. The package is tested on\nmultiple platforms, however you may wish to run the tests on your\nsystem also. More details on running our tox/pytest test suite are\navailable in our `documentation`_.\n\nGetting Started\n---------------\n\nDocumentation is `available here <https://mcalf.macbride.me/>`_.\nSome examples are included `here <examples/>`_.\n\nContributing\n------------\n\n|Contributor Covenant|\n\nIf you find this package useful and have time to make it even better,\nyou are very welcome to contribute to this package, regardless of how much\nprior experience you have.\nTypes of ways you can contribute include, expanding the documentation with\nmore use cases and examples, reporting bugs through the GitHub issue tracker,\nreviewing pull requests and the existing code, fixing bugs and implementing new\nfeatures in the code.\nYou are encouraged to submit any `bug reports`_ and `pull requests`_ directly\nto the `GitHub repository`_.\n\nPlease note that this project is released with a Contributor Code of Conduct.\nBy participating in this project you agree to abide by its terms.\n\nCitation\n--------\n\nIf you have used this package in work that leads to a publication, we would\nbe very grateful if you could acknowledge your use of this package in the\nmain text of the publication.\nPlease cite the following publications,\n\n    MacBride CD, Jess DB. 2021\n    MCALF: Multi-Component Atmospheric Line Fitting.\n    *Journal of Open Source Software*. **6(61)**, 3265.\n    (`doi:10.21105/joss.03265 <https://doi.org/10.21105/joss.03265>`_)\n\n..\n\n    MacBride CD, Jess DB, Grant SDT, Khomenko E, Keys PH, Stangalini M. 2020\n    Accurately constraining velocity information from spectral imaging\n    observations using machine learning techniques.\n    *Philosophical Transactions of the Royal Society A*. **379**, 2190.\n    (`doi:10.1098/rsta.2020.0171 <https://doi.org/10.1098/rsta.2020.0171>`_)\n\nPlease also cite the `Zenodo DOI`_ for the package version you used.\nPlease also consider integrating your code and examples into the package.\n\nLicense\n-------\n\nMCALF is licensed under the terms of the BSD 2-Clause license.\n\n.. |Azure Pipelines Status| image:: https://dev.azure.com/ConorMacBride/mcalf/_apis/build/status/ConorMacBride.mcalf?repoName=ConorMacBride%2Fmcalf&branchName=main\n    :target: https://dev.azure.com/ConorMacBride/mcalf/_build/latest?definitionId=5&repoName=ConorMacBride%2Fmcalf&branchName=main\n    :alt: Azure Pipelines\n.. |Codecov| image:: https://codecov.io/gh/ConorMacBride/mcalf/branch/main/graph/badge.svg\n    :target: https://codecov.io/gh/ConorMacBride/mcalf\n    :alt: Codecov\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/mcalf\n    :target: https://pypi.python.org/pypi/mcalf\n    :alt: PyPI\n.. |Zenodo DOI| image:: https://zenodo.org/badge/DOI/10.5281/zenodo.3924527.svg\n    :target: https://doi.org/10.5281/zenodo.3924527\n    :alt: DOI\n.. |Docs Status| image:: https://readthedocs.org/projects/mcalf/badge/?version=latest&style=flat\n    :target: https://mcalf.macbride.me/\n    :alt: Documentation\n.. |GitHub License| image:: https://img.shields.io/github/license/ConorMacBride/mcalf\n    :target: LICENSE.rst\n    :alt: License\n.. |Contributor Covenant| image:: https://img.shields.io/badge/Contributor%20Covenant-v2.0%20adopted-ff69b4.svg\n    :target: CODE_OF_CONDUCT.rst\n    :alt: Code of Conduct\n\n.. _Anaconda: https://www.anaconda.com/products/individual#Downloads\n.. _Miniconda: https://docs.conda.io/en/latest/miniconda.html\n.. _new conda environment: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html\n.. _documentation: https://mcalf.macbride.me/en/latest/guide/index.html#testing\n\n.. _bug reports: https://github.com/ConorMacBride/mcalf/issues\n.. _pull requests: https://github.com/ConorMacBride/mcalf/pulls\n.. _GitHub repository: https://github.com/ConorMacBride/mcalf\n\n.. _Zenodo DOI: https://doi.org/10.5281/zenodo.3924527\n",
    "bugtrack_url": null,
    "license": "BSD 2-Clause",
    "summary": "\"MCALF: Multi-Component Atmospheric Line Fitting\"",
    "version": "1.0.0",
    "split_keywords": [
        "spectrum",
        "spectra",
        "fitting",
        "absorption",
        "emission",
        "voigt"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2a39755fddaa3bb713d68526350debaf85b9ceddbd3ed94d2e76fc50df27f37d",
                "md5": "3e0f50b9385c07f8acbda957887c8dbe",
                "sha256": "5bf8a7c7ec92b9453c3cc2a9fbf621806e7257dd95d938a67b6b3b2a5b379e22"
            },
            "downloads": -1,
            "filename": "mcalf-1.0.0-cp38-abi3-macosx_10_9_x86_64.whl",
            "has_sig": false,
            "md5_digest": "3e0f50b9385c07f8acbda957887c8dbe",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.7",
            "size": 2123885,
            "upload_time": "2023-03-28T22:54:57",
            "upload_time_iso_8601": "2023-03-28T22:54:57.208086Z",
            "url": "https://files.pythonhosted.org/packages/2a/39/755fddaa3bb713d68526350debaf85b9ceddbd3ed94d2e76fc50df27f37d/mcalf-1.0.0-cp38-abi3-macosx_10_9_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "8861c289cd1278ef8f2d2d393d446c7f8e236bee2e83414e01ea1d68101329ef",
                "md5": "b86e35df3d3e3d02ba42b4469916cfdc",
                "sha256": "18255f3054d0db7595c9de4be4c617ffd2d44934d0cdb3ccd4b3a791e3e44e0e"
            },
            "downloads": -1,
            "filename": "mcalf-1.0.0-cp38-abi3-macosx_11_0_arm64.whl",
            "has_sig": false,
            "md5_digest": "b86e35df3d3e3d02ba42b4469916cfdc",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.7",
            "size": 2124221,
            "upload_time": "2023-03-28T22:55:02",
            "upload_time_iso_8601": "2023-03-28T22:55:02.342447Z",
            "url": "https://files.pythonhosted.org/packages/88/61/c289cd1278ef8f2d2d393d446c7f8e236bee2e83414e01ea1d68101329ef/mcalf-1.0.0-cp38-abi3-macosx_11_0_arm64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a77a9889c804cde9f1082d1e2188e130ce4020eb66a236bac6b2e36c2eea2563",
                "md5": "1b50770d77b5b74c87a55776abe6a17f",
                "sha256": "6b405dca20c67756879085696102a845ef98e7af4c75b923c8a4a32482f45761"
            },
            "downloads": -1,
            "filename": "mcalf-1.0.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "has_sig": false,
            "md5_digest": "1b50770d77b5b74c87a55776abe6a17f",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.7",
            "size": 2127334,
            "upload_time": "2023-03-28T22:55:04",
            "upload_time_iso_8601": "2023-03-28T22:55:04.033918Z",
            "url": "https://files.pythonhosted.org/packages/a7/7a/9889c804cde9f1082d1e2188e130ce4020eb66a236bac6b2e36c2eea2563/mcalf-1.0.0-cp38-abi3-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "62dd1b7dea4ad43235af87587d20277eb2945af03d6dff8a9ab536c23e3ff5aa",
                "md5": "363325e28f0f0ddbabb7563ceaf7c437",
                "sha256": "dc8eb600e57e80f0a971d0c1d5d233d4cf830d7d6c43425a37da312750d61419"
            },
            "downloads": -1,
            "filename": "mcalf-1.0.0-cp38-abi3-win_amd64.whl",
            "has_sig": false,
            "md5_digest": "363325e28f0f0ddbabb7563ceaf7c437",
            "packagetype": "bdist_wheel",
            "python_version": "cp38",
            "requires_python": ">=3.7",
            "size": 2128207,
            "upload_time": "2023-03-28T22:54:59",
            "upload_time_iso_8601": "2023-03-28T22:54:59.687939Z",
            "url": "https://files.pythonhosted.org/packages/62/dd/1b7dea4ad43235af87587d20277eb2945af03d6dff8a9ab536c23e3ff5aa/mcalf-1.0.0-cp38-abi3-win_amd64.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2adf2ca670ffae718d15cf99852a95ad871170672c0b2e2db36760103d16b253",
                "md5": "edcc9a0f088fc00e85ad69211a2bfdae",
                "sha256": "2b3be68544e69efbca6828d0bb6b0900e57ef59f7f505217fd78ef09ac9e95d0"
            },
            "downloads": -1,
            "filename": "mcalf-1.0.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "edcc9a0f088fc00e85ad69211a2bfdae",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7",
            "size": 2122676,
            "upload_time": "2023-03-28T22:57:23",
            "upload_time_iso_8601": "2023-03-28T22:57:23.804615Z",
            "url": "https://files.pythonhosted.org/packages/2a/df/2ca670ffae718d15cf99852a95ad871170672c0b2e2db36760103d16b253/mcalf-1.0.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "d93f08e811f73630c8feb92069a8d80d4eb73b8e6efcecca053409b585f4a901",
                "md5": "3616e8631f16f52e7c1c976c7bf89f49",
                "sha256": "b33d53f1e87f458c4ab6015d8da7a4531daba8c2f995a725cbab13709dc6d773"
            },
            "downloads": -1,
            "filename": "mcalf-1.0.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3616e8631f16f52e7c1c976c7bf89f49",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7",
            "size": 2204748,
            "upload_time": "2023-03-28T22:55:06",
            "upload_time_iso_8601": "2023-03-28T22:55:06.486544Z",
            "url": "https://files.pythonhosted.org/packages/d9/3f/08e811f73630c8feb92069a8d80d4eb73b8e6efcecca053409b585f4a901/mcalf-1.0.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-03-28 22:55:06",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "ConorMacBride",
    "github_project": "mcalf",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "tox": true,
    "lcname": "mcalf"
}
        
Elapsed time: 0.05593s