A fast general purpose monte carlo particle simulator (photons, electrons and positrons). Written in Cython, Python and C++.
Project description
MontyCarlo (v0.0.41-pre-alpha)
MontyCarlo is a pyhon framework for setting up simulations and/or developing applications whose basis is the simulation of radiation transport. It simulates the propagation and effects of ionizing radiation (photons, electrons and positrons with energies between 1keV and 1GeV) in matter of homogeneous density, filling CSG models.
As of yet, this is an unstable version. This is a thesis project and, as a student, I am still learning!
This work has a poster presentation in the 3rd European Congress of Medical Physics and has been presented in a workshop organized by the Faculty of Sciences of the University of Porto and the Ludwig Maximilian University of Munich.
Installation
It is highly recommended that you install MontyCarlo v0.0.41-pre-alpha on a conda virtual environment containing one of the following python versions, and nothing else: 3.7, 3.8 or 3.9. To do so, open an anaconda prompt and run the commands:
conda create --name py39 python=3.9
conda activate py39
The installation steps are simple:
pip install MontyCarlo
python -c "import MontyCarlo"
MyCo will detect that it is the first import and will proceed to download all the necessary databases:
- EADL (*.txt)
- EPDL (*.txt)
- EEDL (*.txt)
- Electron Elastic (*.npy)
- Positron Elastic (*.npy)
A first run !
Once you've installed MontyCarlo, clone the following repository: https://github.com/RuiFilipeCampos/MyCo-EXAMPLE1
Inside this repository folder simply run:
python main.py
Have fun exploring high energy particle tracks in a 3d environment!
- White tracks: Photons
- Blue tracks: electrons
- Red tracks: positrons
The innermost sphere contains water, the outer sphere contains air and the rest of space is filled with gold.
Be sure to zoom in on every detail!
Bugs
This is a very early version of a fairly large code. Bugs are guaranteed! Submitting an issue is a great way to contribute to the project at this stage!
Possible Future Work
- Sources
- Tallying
- Energy Deposition (1d, 2d, 3d, 4d(spatial + temporal) )
- Flux
- Others
- Variance reduction
- Image Detectors
- Extension to E < 1keV (e.g. for laser applications)
- Extension to E > 1GeV
- Implementation of other particles
- Protons
- Neutrons
- etc...
- Dedicated graphics engine (w/sphere tracing)
- An auto-cad like GUI for CSG modeling
- Geant4 like API
- GPU accelaration
- CPU multiprocessing/multithreading
- Advanced data vizualization (w/ ParaView)
- Distributed Cloud Computing
- Dedicated python notebook (like Jupyter)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
File details
Details for the file MontyCarlo-0.1a0.dev1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: MontyCarlo-0.1a0.dev1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 16.6 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fff8b87b28a301e9dd6d90394fcdd25d5846bc59a9f180092ed27493726c5f5d |
|
MD5 | 957c1a4e0f222eafd7ca314eb418db44 |
|
BLAKE2b-256 | 24739565bd781c8965b1ccb2ac7d6214a754a3aa65893b359490602e9c707bcb |
Provenance
File details
Details for the file MontyCarlo-0.1a0.dev1-cp39-cp39-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: MontyCarlo-0.1a0.dev1-cp39-cp39-macosx_10_14_x86_64.whl
- Upload date:
- Size: 21.5 MB
- Tags: CPython 3.9, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2486a35246edaf31582fbbf867c641c860bb757ab59c1bddcbe5a3402f0b750 |
|
MD5 | b328c1e6ca9fe62a91fc591dcdb08ba5 |
|
BLAKE2b-256 | 2dc438a39ab41406ca2a206722b644fc432d8890de02c7c766a52a96e2271a3b |
Provenance
File details
Details for the file MontyCarlo-0.1a0.dev1-cp38-cp38-win_amd64.whl
.
File metadata
- Download URL: MontyCarlo-0.1a0.dev1-cp38-cp38-win_amd64.whl
- Upload date:
- Size: 15.2 MB
- Tags: CPython 3.8, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47ddc00e4ceb1cd7e0aa91e494df6918f94d306b254da9076c1b1abd478eea16 |
|
MD5 | 3a37a19bd382afbfd172f1ec0b44b509 |
|
BLAKE2b-256 | b8daceae3800285e2612c09413bb6859d9b0b16a52a9cf64b019677feb640ef4 |
Provenance
File details
Details for the file MontyCarlo-0.1a0.dev1-cp38-cp38-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: MontyCarlo-0.1a0.dev1-cp38-cp38-macosx_10_14_x86_64.whl
- Upload date:
- Size: 21.4 MB
- Tags: CPython 3.8, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f2776783c85321ea3bfbb64ba82970318f30f75d6c6c86f472749c5d999f248 |
|
MD5 | 74928b8b31ec78ed09e112706b517a42 |
|
BLAKE2b-256 | 16595890cae178e4e655a952c3f9ee64cbe363eb9ca299d6f64f81bad88cb4d3 |
Provenance
File details
Details for the file MontyCarlo-0.1a0.dev1-cp37-cp37m-win_amd64.whl
.
File metadata
- Download URL: MontyCarlo-0.1a0.dev1-cp37-cp37m-win_amd64.whl
- Upload date:
- Size: 16.6 MB
- Tags: CPython 3.7m, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a96e6babee47bf07d1d6a13f7e1035c079c3c7f17d4ff6ba2af918e509acf77b |
|
MD5 | 0a4c6575b2a8aa35e4edf104ce31ef40 |
|
BLAKE2b-256 | 93a47c7597b6cfd0a2f6124d5f31d8398671ee103500e78de2351a50fe23e1ca |
Provenance
File details
Details for the file MontyCarlo-0.1a0.dev1-cp37-cp37m-macosx_10_14_x86_64.whl
.
File metadata
- Download URL: MontyCarlo-0.1a0.dev1-cp37-cp37m-macosx_10_14_x86_64.whl
- Upload date:
- Size: 21.3 MB
- Tags: CPython 3.7m, macOS 10.14+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.6.0 pkginfo/1.6.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.61.2 CPython/3.8.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 625c1c20e73536a4707353741f36e6308d19025f59c54cf1c7d327182479d8ba |
|
MD5 | 5e6afc8ff7638274c0008bf2bd292f29 |
|
BLAKE2b-256 | 64388e4359abe5f8cdb3aa2760533d15a52c3c9afecc792b34a31186a73a1338 |