A simulator for neutrino propagation through the earth.
Project description
Propagate neutrinos through the earth.
A python package and command line utility, including fortran for performance with openMP.
Documentation (WIP): https://nupyprop.readthedocs.io/en/latest/
Note: While the documentation is currently WIP, users and developers should consult the nuPyProp tutorial repository for visualizing output from the code and creating user-defined models.
Installation
with pip
python3 -m pip install nupyprop
with conda
We recommend installing nupyprop into a conda environment like so. In this example the name of the environment is “nupyprop”
conda create -n nupyprop -c conda-forge -c nuspacesim nupyprop conda activate nupyprop
Usage
nupyprop --help
Example for running tau propagation for 107 GeV neutrinos at 10 degrees with 107 neutrinos injected with stochastic energy loss & with all other parameters as defaults:
nupyprop -e 7 -a 10 -t stochastic -s 1e7
Run parameters are defined in run.py. Different switches are described as follows:
-e or --energy: incoming neutrino energy in log_10(GeV). Works for single energy or multiple energies. For multiple energies, separate energies with commas eg. 6,7,8,9,10,11. Default energies are 106,106.25,106.5,…1011 GeV.
-a or --angle: slant Earth angles in degrees. Works for single angle or multiple angles. For multiple angles, separate angles with commas eg. 1,3,5,7,10. Default angles are 1->42 degrees, in steps of 1 degree.
-i or --idepth: depth of ice/water in km. Default value is 4 km.
-cl or --charged_lepton: flavor of charged lepton used to propagate. Can be either muon or tau. Default is tau.
-n or --nu_type: type of neutrino matter. Can be either neutrino or anti-neutrino. Default is neutrino.
-t or --energy_loss: energy loss type for lepton - can be stochastic or continuous. Default is stochastic.
-x or --xc_model: neutrino/anti-neutrino cross-section model used. Can be from the pre-defined set of models (see xc-table) or custom. Default is ct18nlo.
-p or --pn_model: photonuclear interaction energy loss model used. Can be from the pre-defined set of models (see pn-table) or custom. Default is allm.
-f or --fac_nu: rescaling factor for BSM cross-sections. Default is 1.
-s or --stats: statistics or no. of injected neutrinos. Default is 1e7 neutrinos.
-htc or --htc_mode: High throughput computing mode. If set to yes, the code will be optimized to run in high throughput computing mode. Default is no.
Viewing output results: output_*.h5 will contain the results of the code after it has finished running. In the terminal, run vitables (optional dependency) and open the output_*.h5 file to view the output results.
output_*.h5 naming convention is as follows: output_A_B_C_D_E_F_G, where
Model Tables
Neutrino/Anti-Neutrino Cross-Section Model
Reference
Abramowicz, Levin, Levy, Maor (ALLM)
Block, Durand, Ha, McKay (BDHM)
CTEQ18-NLO
Connolly, Thorne, Waters (CTW)
nCTEQ15
User Defined
Charged Lepton Photonuclear Energy Loss Model
Reference
Abramowicz, Levin, Levy, Maor (ALLM)
Bezrukov-Bugaev (BB)
Block, Durand, Ha, McKay (BDHM)
Capella, Kaidalov, Merino, Tran (CKMT)
User Defined
Code Execution Timing Tables
Charged Lepton
Energy Loss Type
E|nu| [GeV]
Angles
N|nu|;;in
Time (hrs)
τ
Stochastic
107
1-35
108
1.07*, 0.26***
τ
Continuous
107
1-35
108
0.88*
τ
Stochastic
108
1-35
108
6.18*, 1.53***
τ
Continuous
108
1-35
108
5.51*
τ
Stochastic
109
1-35
108
27.96*, 5.08***
τ
Continuous
109
1-35
108
19.11*
τ
Stochastic
1010
1-35
108
49.80*, 12.43***
τ
Continuous
1010
1-35
108
35.59*
τ
Stochastic
1011
1-35
108
12.73***
τ
Continuous
1011
1-35
108
Charged Lepton
Energy Loss Type
E|nu| [GeV]
Angles
N|nu|;;in
Time (hrs)
μ
Stochastic
106
1,2,3,5,7,10,12,15,17,20,25,30,35
108
μ
Continuous
106
1,2,3,5,7,10,12,15,17,20,25,30,35
108
0.95*
μ
Stochastic
107
1,2,3,5,7,10,12,15,17,20,25,30,35
108
μ
Continuous
107
1,2,3,5,7,10,12,15,17,20,25,30,35
108
3.19*
μ
Stochastic
108
1,2,3,5,7,10,12,15,17,20,25,30,35
108
μ
Continuous
108
1,2,3,5,7,10,12,15,17,20,25,30,35
108
5.17*
μ
Stochastic
109
1,2,3,5,7,10,12,15,17,20,25,30,35
108
111.77**
μ
Continuous
109
1,2,3,5,7,10,12,15,17,20,25,30,35
108
7.42*
μ
Stochastic
1010
1,2,3,5,7,10,12,15,17,20,25,30,35
108
98.17*
μ
Continuous
1010
1,2,3,5,7,10,12,15,17,20,25,30,35
108
9.76*
μ
Stochastic
1011
1,2,3,5,7,10,12,15,17,20,25,30,35
108
μ
Continuous
1011
1,2,3,5,7,10,12,15,17,20,25,30,35
108
* - Intel Core i7-8750H; 6 cores & 12 threads. ** - Intel Core i5-10210; 4 cores & 8 threads. *** - UIowa Argon cluster; 56 cores.
For debugging/development: The correct order to look at the code is in the following order:
data.py: contains functions for reading/writing from/to hdf5 files.
geometry.py: contains the Earth geometry modules (including PREM) for use with python/fortran.
models.py: contains neutrino cross-section & charged lepton energy loss model templates.
propagate.f90: heart of the code; contains fortran modules to interpolate between geometry variables, cross-sections, energy loss parameters & propagate neutrinos and charged leptons through the Earth.
main.py: forms the main skeleton of the code; propagates the neutrinos and charged leptons, and calculates the p_exit and collects outgoing lepton energies.
run.py: contains all the run parameters and variables needed for all the other .py files.
Developing the code on Ubuntu
These notes should help developers of this code build and install the package locally using a pep518 compliant build system (pip).
Install the non-pypi required dependencies as described for users above.
Install a fortran compiler. ex: sudo apt-get install gfortran
git clone the source code: git clone git@github.com:NuSpaceSim/nupyprop.git
cd nupyprop
build and install the package in ‘editable’ mode python3 -m pip install -e .
Developing the code on MacOS
These notes should help developers of this code build and install the package locally using a pep518 compliant build system (pip). Currently we do not support the default system python3 on MacOS which is out of date and missing critical functionality. Use the homebrew python instead, or a virtualenv, or a conda environment.
Install the non-pypi required dependencies as described for users above.
Install a fortran compiler. ex: brew install gcc
git clone the source code: git clone git@github.com:NuSpaceSim/nupyprop.git
cd nupyprop
build and install the package in ‘editable’ mode python3 -m pip install -e .
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 nupyprop-0.1.7.post115-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post115-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.4 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | db7cf115a8593f1d77b3a3b1db683f64dbc815891cd1d1c79f640e9d001e435b |
|
MD5 | 0314077ce8cd91f5330d246269d6ff5d |
|
BLAKE2b-256 | 1b0a31ae6ea4361eabddf69401928599648eccc0818e752953e1846e74ee51a2 |
File details
Details for the file nupyprop-0.1.7.post115-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post115-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae58c68b9ee034498a01eca98698f4e243df690a3644a181ce377f8d695534bb |
|
MD5 | 94215cce24f6fdecf5d2473d00523b41 |
|
BLAKE2b-256 | c28af7b9733ead61d3ae403d82dccb91881c23820deb873d5f3c48a4130d4407 |
File details
Details for the file nupyprop-0.1.7.post115-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post115-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.4 MB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1dcdfe74052bf0aa52f49228adb4261f47c2fb70496caa69839848801859994c |
|
MD5 | d73ad9ce2f0185de63449e80841d4b6d |
|
BLAKE2b-256 | 89598911f725a261b9340d0c1f90321d993d3ead907133fbf39a5c6db50d9188 |
File details
Details for the file nupyprop-0.1.7.post115-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post115-cp38-cp38-macosx_10_9_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.8, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16b3c5b6b79ae7918c1e7533ac84709e02c960c01e5ad7006fd3663795e58dab |
|
MD5 | 246187d826e86adc15cfce7c8b41be8a |
|
BLAKE2b-256 | 3a055c370a839e60fc70849ff9c77e7ffcbcbbfcf2a1e086977f7957c8471ab0 |
File details
Details for the file nupyprop-0.1.7.post115-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post115-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 16.4 MB
- Tags: CPython 3.7m, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2f32587e3a3d1f26dea40bab7c70c4724af69b3c8584b7db117c2cb9e7e93be2 |
|
MD5 | ec4cd8c2dd712e2c3fc50f903ce48e20 |
|
BLAKE2b-256 | e6073d4ec52001bf43a40603b30f94acfb7c2dd99c6a30d18fed4635ebacf367 |
File details
Details for the file nupyprop-0.1.7.post115-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post115-cp37-cp37m-macosx_10_9_x86_64.whl
- Upload date:
- Size: 16.5 MB
- Tags: CPython 3.7m, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7b9e3937d95475399321f73f1086f5a53959318defae2fe7df4bf6c55743ec3b |
|
MD5 | 553e4ea6d35f60853cdcb9124e731972 |
|
BLAKE2b-256 | e9140ab00de7deeae4827a6335dfae92a0d09f5a0abc241a04d2daeda2b1535e |