[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![CI-tests](https://github.com/MaximeLagrange/muograph/actions/workflows/test.yml/badge.svg)](https://github.com/MaximeLagrange/muograph/actions)
[![CI-lints](https://github.com/MaximeLagrange/muograph/actions/workflows/lint.yml/badge.svg)](https://github.com/MaximeLagrange/muograph/actions)
[![muograph python compatibility](https://img.shields.io/pypi/pyversions/muograph.svg)](https://pypi.python.org/pypi/muograph)
[![muograph license](https://img.shields.io/pypi/l/muograph.svg)](https://pypi.python.org/pypi/muograph)
[![pypi muograph version](https://img.shields.io/pypi/v/muograph.svg)](https://pypi.python.org/pypi/muograph)
# Muograph: muon tomography library
![logo](https://drive.google.com/uc?id=1VbnNRMNspKIhvf1e5_U_4oZadRiaLM_M)
This repository provides a library for muon scattering tomography and muon transmission tomography data analysis.
## Overview
As a disclaimer, this library is more of an aggregate of muon tomography algorithms used throughtout PhD research rather than a polished product for the general public. As such, this repo targets mostly muon tomography reaserchers and enthousiasts.
Users can find ready to use scattering density algorihms as well as samples of simulated data.
While currently being at a preliminary stage, this library is designed to be extended by users, whom are invited to implement their favorite reconstruction, material inference or image processing algorithms.
If you are interested in using this library seriously, please contact us; we would love to hear if you have a specific use-case you wish to work on.
<p align="center">
<img src="https://drive.google.com/uc?id=1m1e9KE8Ei6cQRzPsp-W47o0uZvFO0Nb3" />
</p>
## Installation
### As a dependency
For a dependency usage, `muograph` can be instaled with `pip`:
```bash
pip install muograph
```
Make sure everythings works by running:
```bash
pytest path_to_muograph/test
```
You can check the location where muograph is installed:
```bash
pip show muograph
```
### For development
Clone the repository locally:
```bash
git clone git@github.com:MaximeLagrange/muograph.git
cd muograph
```
For development usage, we use [`poetry`](https://python-poetry.org/docs/#installing-with-the-official-installer) to handle dependency installation:
```bash
curl -sSL https://install.python-poetry.org | python3 -
```
To get started, you need Poetry's bin directory in your `PATH` environment variable. Add the export command to your shell's configuration file. For bash, add it to the `~/.bashrc` file. For zsh, add it to the `~/.zshrc` file.
```bash
export PATH="$HOME/.local/bin:$PATH"
```
then reload the configuration file:
```bash
source ~/.bashrc # or source ~/.zshrc
```
Poetry should now be accessible:
```bash
poetry self update
```
Muograph requires `python >= 3.10`. This can be installed with e.g [`pyenv`](https://github.com/pyenv/pyenv).
```bash
curl https://pyenv.run | bash
pyenv update
pyenv install 3.10
pyenv local 3.10
```
Install the dependencies:
```bash
poetry install
poetry self add poetry-plugin-export
poetry config warnings.export false
poetry run pre-commit install
```
Finally, make sure everything is working as expected by running the tests:
```bash
poetry run pytest muograph/test/
```
For those unfamiliar with poetry, basically just prepend commands with `poetry run` to use the stuff installed within the local environment, e.g. `poetry run jupyter notebook` to start a jupyter notebook server. This local environment is basically a python virtual environment. To correctly set up the interpreter in your IDE, use `poetry run which python` to see the path to the correct python executable.
## Tutorials
A few tutorials to introduce users to the package can be found in the `tutorial/` folder. They are provied as Jupyter notebooks:
- `00_Volume_of_interest.ipynb` shows how to define a voxelized volume of interest, later used by the reconstruction algorithms.
- `01_Hits.ipynb` demonstrates how to load muon hits, and simulate detector spatial resolution and/or efficiency effects.
- `02_Tracking.ipynb` shows how to convert muon hits into muon tracks usable for image reconstruction purposes.
- `03_Tracking_muon_Scattering_tomography.ipynb` combines incoming and ougoing tracks to compute features relevant to muon scatering tomography.
- `04_POCA.ipynb` takes the user through the computation of voxel-wise density predictions based on the Point of Closest Approach.
- `05_Binned_clustered_algorithm.ipynb` demonstrates the Binned Clustered Algorithm, with and without muon momentum information.
- `06_Angle_statistical_reconstruction.ipynb` shows the Angle Statistical Reconstruction algorithm, with and without muon momentum information.
You can run the tutorials using poetry command:
```bash
poetry run jupyter notebook muograph/tutorials/05_Binned_clustered_algorithm.ipynb
```
## Examples
More advanced examples are provided in the `muograph/examples`:
```bash
poetry run jupyter notebook muograph/examples/00_scattering_small_size_statue.ipynb
```
Raw data
{
"_id": null,
"home_page": "https://github.com/MaximeLagrange/muograph",
"name": "muograph",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.10",
"maintainer_email": null,
"keywords": "physics, science, statistics, muon tomography, detector simulation",
"author": "Maxime Lagrange",
"author_email": "muograph.ml@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/99/60/8da3066959f5e9d81792d38094bc9bf7762a272ad337131cc5f0601b726c/muograph-0.1.9.tar.gz",
"platform": null,
"description": "[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![CI-tests](https://github.com/MaximeLagrange/muograph/actions/workflows/test.yml/badge.svg)](https://github.com/MaximeLagrange/muograph/actions)\n[![CI-lints](https://github.com/MaximeLagrange/muograph/actions/workflows/lint.yml/badge.svg)](https://github.com/MaximeLagrange/muograph/actions)\n[![muograph python compatibility](https://img.shields.io/pypi/pyversions/muograph.svg)](https://pypi.python.org/pypi/muograph)\n[![muograph license](https://img.shields.io/pypi/l/muograph.svg)](https://pypi.python.org/pypi/muograph)\n[![pypi muograph version](https://img.shields.io/pypi/v/muograph.svg)](https://pypi.python.org/pypi/muograph)\n\n# Muograph: muon tomography library\n\n![logo](https://drive.google.com/uc?id=1VbnNRMNspKIhvf1e5_U_4oZadRiaLM_M)\n\n\nThis repository provides a library for muon scattering tomography and muon transmission tomography data analysis.\n\n## Overview\n\nAs a disclaimer, this library is more of an aggregate of muon tomography algorithms used throughtout PhD research rather than a polished product for the general public. As such, this repo targets mostly muon tomography reaserchers and enthousiasts.\n\nUsers can find ready to use scattering density algorihms as well as samples of simulated data.\n\nWhile currently being at a preliminary stage, this library is designed to be extended by users, whom are invited to implement their favorite reconstruction, material inference or image processing algorithms.\n\nIf you are interested in using this library seriously, please contact us; we would love to hear if you have a specific use-case you wish to work on.\n\n<p align=\"center\">\n <img src=\"https://drive.google.com/uc?id=1m1e9KE8Ei6cQRzPsp-W47o0uZvFO0Nb3\" />\n</p>\n\n## Installation\n\n### As a dependency\n\nFor a dependency usage, `muograph` can be instaled with `pip`:\n\n```bash\npip install muograph\n```\n\nMake sure everythings works by running:\n\n```bash\npytest path_to_muograph/test\n```\n\nYou can check the location where muograph is installed:\n\n```bash\npip show muograph\n```\n\n### For development\n\nClone the repository locally:\n\n```bash\ngit clone git@github.com:MaximeLagrange/muograph.git\ncd muograph\n```\n\nFor development usage, we use [`poetry`](https://python-poetry.org/docs/#installing-with-the-official-installer) to handle dependency installation:\n\n```bash\ncurl -sSL https://install.python-poetry.org | python3 -\n```\n\nTo get started, you need Poetry's bin directory in your `PATH` environment variable. Add the export command to your shell's configuration file. For bash, add it to the `~/.bashrc` file. For zsh, add it to the `~/.zshrc` file.\n\n```bash\nexport PATH=\"$HOME/.local/bin:$PATH\"\n```\n\nthen reload the configuration file:\n\n```bash\nsource ~/.bashrc # or source ~/.zshrc\n```\n\nPoetry should now be accessible:\n\n```bash\npoetry self update\n```\n\nMuograph requires `python >= 3.10`. This can be installed with e.g [`pyenv`](https://github.com/pyenv/pyenv).\n\n```bash\ncurl https://pyenv.run | bash\npyenv update\npyenv install 3.10\npyenv local 3.10\n```\n\nInstall the dependencies:\n\n```bash\npoetry install\npoetry self add poetry-plugin-export\npoetry config warnings.export false\npoetry run pre-commit install\n```\n\nFinally, make sure everything is working as expected by running the tests:\n\n```bash\npoetry run pytest muograph/test/\n```\n\nFor those unfamiliar with poetry, basically just prepend commands with `poetry run` to use the stuff installed within the local environment, e.g. `poetry run jupyter notebook` to start a jupyter notebook server. This local environment is basically a python virtual environment. To correctly set up the interpreter in your IDE, use `poetry run which python` to see the path to the correct python executable.\n\n\n## Tutorials\n\nA few tutorials to introduce users to the package can be found in the `tutorial/` folder. They are provied as Jupyter notebooks:\n\n - `00_Volume_of_interest.ipynb` shows how to define a voxelized volume of interest, later used by the reconstruction algorithms.\n - `01_Hits.ipynb` demonstrates how to load muon hits, and simulate detector spatial resolution and/or efficiency effects.\n - `02_Tracking.ipynb` shows how to convert muon hits into muon tracks usable for image reconstruction purposes.\n - `03_Tracking_muon_Scattering_tomography.ipynb` combines incoming and ougoing tracks to compute features relevant to muon scatering tomography.\n - `04_POCA.ipynb` takes the user through the computation of voxel-wise density predictions based on the Point of Closest Approach.\n - `05_Binned_clustered_algorithm.ipynb` demonstrates the Binned Clustered Algorithm, with and without muon momentum information.\n - `06_Angle_statistical_reconstruction.ipynb` shows the Angle Statistical Reconstruction algorithm, with and without muon momentum information.\n\nYou can run the tutorials using poetry command:\n\n```bash\npoetry run jupyter notebook muograph/tutorials/05_Binned_clustered_algorithm.ipynb\n```\n\n## Examples\n\nMore advanced examples are provided in the `muograph/examples`:\n\n```bash\npoetry run jupyter notebook muograph/examples/00_scattering_small_size_statue.ipynb\n```\n",
"bugtrack_url": null,
"license": "AGPL-3.0-only",
"summary": "Muon tomography data analysis library",
"version": "0.1.9",
"project_urls": {
"Homepage": "https://github.com/MaximeLagrange/muograph"
},
"split_keywords": [
"physics",
" science",
" statistics",
" muon tomography",
" detector simulation"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "afcec647d40196c82855decf10ba5bc8cf363d830fd8fcb371e49e58f3d7b6a8",
"md5": "51026a0ca8bc8785439d0ab5fcc12094",
"sha256": "28b60076eb0491bc136f8f80f1577fa06b0434c12223b85b305da498831cac76"
},
"downloads": -1,
"filename": "muograph-0.1.9-py3-none-any.whl",
"has_sig": false,
"md5_digest": "51026a0ca8bc8785439d0ab5fcc12094",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.10",
"size": 38897402,
"upload_time": "2024-12-06T17:01:47",
"upload_time_iso_8601": "2024-12-06T17:01:47.536391Z",
"url": "https://files.pythonhosted.org/packages/af/ce/c647d40196c82855decf10ba5bc8cf363d830fd8fcb371e49e58f3d7b6a8/muograph-0.1.9-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "99608da3066959f5e9d81792d38094bc9bf7762a272ad337131cc5f0601b726c",
"md5": "a0ac9dfe710b6d18f1a83e0109ba464d",
"sha256": "520d1a91fcfc2583e229a04dbfb21e8274de91ba0fd0b6985bc1cb6993900e3a"
},
"downloads": -1,
"filename": "muograph-0.1.9.tar.gz",
"has_sig": false,
"md5_digest": "a0ac9dfe710b6d18f1a83e0109ba464d",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.10",
"size": 38851037,
"upload_time": "2024-12-06T17:01:53",
"upload_time_iso_8601": "2024-12-06T17:01:53.787502Z",
"url": "https://files.pythonhosted.org/packages/99/60/8da3066959f5e9d81792d38094bc9bf7762a272ad337131cc5f0601b726c/muograph-0.1.9.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-06 17:01:53",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "MaximeLagrange",
"github_project": "muograph",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "muograph"
}