# beetroots
[](https://badge.fury.io/py/beetroots)
[](https://beetroots.readthedocs.io/en/latest/?badge=latest)
Beetroots (BayEsian infErence with spaTial Regularization of nOisy multi-line ObservaTion mapS) is a Python package that performs Bayesian inference of physical parameters from multispectral-structured cubes with a dedicated sampling algorithm.
Thanks to this sampling algorithm, `beetroots` provides maps of credibility intervals along with estimated maps.
The sampling algorithm is introduced in
> \[1\] P. Palud, P.-A. Thouvenin, P. Chainais, E. Bron, and F. Le Petit - **Efficient sampling of non log-concave posterior distributions with mixture of noises**, *IEEE Transactions on Signal Processing*, vol. 71, pp. 2491 -- 2501, 2023. [doi:10.1109/TSP.2023.3289728](https://doi.org/10.1109/TSP.2023.3289728)
Such inversions rely on a forward model that is assumed to emulate accurately the physics of the observed environment.
In parallel of the inversion, `beetroots` tests this hypothesis to evaluate the validity of the inference results.
The testing method is described in (in French)
> \[2\] P. Palud, P. Chainais, F. Le Petit, P.-A. Thouvenin and E. Bron - **Problèmes inverses et test bayésien d'adéquation du modèle**, *GRETSI - Groupe de Recherche en Traitement du Signal et des Images* in *29e Colloque sur le traitement du signal et des images*, Grenoble, pp. 705 -- 708, 2023.
This package was applied e.g., to infer physical conditions in different regions of the interstellar medium in
> \[3\] P. Palud, P.-A. Thouvenin, P. Chainais, E. Bron, F. Le Petit and ORION-B consortium - **Beetroots: Bayesian inference of interstellar medium physical parameter maps with a spatial regularization**, in prep
## Complex forward models
In numerous real-life applications, the forward model is a complex numerical simulation.
In the astrophysics applications presented in the documentation, the numerical simulation is replaced with a neural network-based approximation of the forward model for
- faster evaluation
- ability to evaluate derivatives
The package used to derive this approximation is `nnbma` (Neural Network-Based Model Approximation).
The GitHub repository can be found [here](https://github.com/einigl/ism-model-nn-approximation), the package [here](https://pypi.org/project/nnbma/) and the corresponding documentation [here](https://ism-model-nn-approximation.readthedocs.io/en/latest/?badge=latest).
The paper presenting this package is
> \[5\] P. Palud, L. Einig, F. Le Petit, E. Bron, P. Chainais, J. Chanussot, J. Pety, P.-A. Thouvenin and ORION-B consortium - **Neural network-based emulation of interstellar medium models**, *Astronomy & Astrophysics*, 2023, 678, pp.A198. [doi:10.1051/0004-6361/202347074](https://doi.org/10.1051/0004-6361/202347074)
## Installation and testing
To prepare and perform an inversion, we recommend installing the package.
The package can be installed with `pip`:
```shell
pip install beetroots
```
or by cloning the repo.
To clone, install and test the package, run:
```shell
git clone git@github.com:pierrePalud/beetroots.git
cd beetroots
poetry install # or poetry install -E notebook -E docs for extra dependencies
poetry shell
pytest
```
Raw data
{
"_id": null,
"home_page": "https://github.com/pierrePalud/beetroots",
"name": "beetroots",
"maintainer": null,
"docs_url": null,
"requires_python": "<3.12,>=3.9",
"maintainer_email": null,
"keywords": "Bayesian inference, statistics, artificial intelligence, multi-line maps, interstellar medium",
"author": "Pierre Palud",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/e6/42/84e0296ccddd49a96741fe406c34ff8811493e0558b812a7bc00fbdeb874/beetroots-1.1.0.tar.gz",
"platform": null,
"description": "# beetroots\n\n[](https://badge.fury.io/py/beetroots)\n[](https://beetroots.readthedocs.io/en/latest/?badge=latest)\n\nBeetroots (BayEsian infErence with spaTial Regularization of nOisy multi-line ObservaTion mapS) is a Python package that performs Bayesian inference of physical parameters from multispectral-structured cubes with a dedicated sampling algorithm.\nThanks to this sampling algorithm, `beetroots` provides maps of credibility intervals along with estimated maps.\n\nThe sampling algorithm is introduced in\n\n> \\[1\\] P. Palud, P.-A. Thouvenin, P. Chainais, E. Bron, and F. Le Petit - **Efficient sampling of non log-concave posterior distributions with mixture of noises**, *IEEE Transactions on Signal Processing*, vol. 71, pp. 2491 -- 2501, 2023. [doi:10.1109/TSP.2023.3289728](https://doi.org/10.1109/TSP.2023.3289728)\n\nSuch inversions rely on a forward model that is assumed to emulate accurately the physics of the observed environment.\nIn parallel of the inversion, `beetroots` tests this hypothesis to evaluate the validity of the inference results.\nThe testing method is described in (in French)\n\n> \\[2\\] P. Palud, P. Chainais, F. Le Petit, P.-A. Thouvenin and E. Bron - **Probl\u00e8mes inverses et test bay\u00e9sien d'ad\u00e9quation du mod\u00e8le**, *GRETSI - Groupe de Recherche en Traitement du Signal et des Images* in *29e Colloque sur le traitement du signal et des images*, Grenoble, pp. 705 -- 708, 2023.\n\nThis package was applied e.g., to infer physical conditions in different regions of the interstellar medium in\n\n> \\[3\\] P. Palud, P.-A. Thouvenin, P. Chainais, E. Bron, F. Le Petit and ORION-B consortium - **Beetroots: Bayesian inference of interstellar medium physical parameter maps with a spatial regularization**, in prep\n\n## Complex forward models\n\nIn numerous real-life applications, the forward model is a complex numerical simulation.\nIn the astrophysics applications presented in the documentation, the numerical simulation is replaced with a neural network-based approximation of the forward model for\n\n- faster evaluation\n- ability to evaluate derivatives\n\nThe package used to derive this approximation is `nnbma` (Neural Network-Based Model Approximation).\nThe GitHub repository can be found [here](https://github.com/einigl/ism-model-nn-approximation), the package [here](https://pypi.org/project/nnbma/) and the corresponding documentation [here](https://ism-model-nn-approximation.readthedocs.io/en/latest/?badge=latest).\nThe paper presenting this package is\n\n> \\[5\\] P. Palud, L. Einig, F. Le Petit, E. Bron, P. Chainais, J. Chanussot, J. Pety, P.-A. Thouvenin and ORION-B consortium - **Neural network-based emulation of interstellar medium models**, *Astronomy & Astrophysics*, 2023, 678, pp.A198. [doi:10.1051/0004-6361/202347074](https://doi.org/10.1051/0004-6361/202347074)\n\n## Installation and testing\n\nTo prepare and perform an inversion, we recommend installing the package.\nThe package can be installed with `pip`:\n\n```shell\npip install beetroots\n```\n\nor by cloning the repo.\nTo clone, install and test the package, run:\n\n```shell\ngit clone git@github.com:pierrePalud/beetroots.git\ncd beetroots\npoetry install # or poetry install -E notebook -E docs for extra dependencies\npoetry shell\npytest\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Beetroots (BayEsian infErence with spaTial Regularization of nOisy multi-line ObservaTion mapS)",
"version": "1.1.0",
"project_urls": {
"Bug Tracker": "https://github.com/pierrePalud/beetroots/issues",
"Documentation": "https://beetroots.readthedocs.io/en/latest/",
"Homepage": "https://github.com/pierrePalud/beetroots",
"Repository": "https://github.com/pierrePalud/beetroots"
},
"split_keywords": [
"bayesian inference",
" statistics",
" artificial intelligence",
" multi-line maps",
" interstellar medium"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "e9a66cb6ab9f9602bb1e62e237fe56a3054b2caa1811b71cc2ff2278fa9df0fe",
"md5": "a2b8996c186903d68171a64ddd518eab",
"sha256": "447f4a27b012a2fb30346d42d2a9084ca747ce2e83a292cbca25008a2d1a207b"
},
"downloads": -1,
"filename": "beetroots-1.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "a2b8996c186903d68171a64ddd518eab",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<3.12,>=3.9",
"size": 172939,
"upload_time": "2025-02-17T14:40:17",
"upload_time_iso_8601": "2025-02-17T14:40:17.751738Z",
"url": "https://files.pythonhosted.org/packages/e9/a6/6cb6ab9f9602bb1e62e237fe56a3054b2caa1811b71cc2ff2278fa9df0fe/beetroots-1.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "e64284e0296ccddd49a96741fe406c34ff8811493e0558b812a7bc00fbdeb874",
"md5": "09384325fd9cb6411855db1fc8454f2d",
"sha256": "8e4721700eaadee85e09d5ba8293293ab9c31cfa547d85521e541c9baad4a3cc"
},
"downloads": -1,
"filename": "beetroots-1.1.0.tar.gz",
"has_sig": false,
"md5_digest": "09384325fd9cb6411855db1fc8454f2d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<3.12,>=3.9",
"size": 117842,
"upload_time": "2025-02-17T14:40:20",
"upload_time_iso_8601": "2025-02-17T14:40:20.694865Z",
"url": "https://files.pythonhosted.org/packages/e6/42/84e0296ccddd49a96741fe406c34ff8811493e0558b812a7bc00fbdeb874/beetroots-1.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-17 14:40:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "pierrePalud",
"github_project": "beetroots",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "beetroots"
}