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.post106-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post106-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.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 76fd5d4f289b72656f40e3fd21ce707e019aea91edabd076b5b77e51f2e20323 |
|
MD5 | 7dc6cdf85347f1f1eba99c291f6941d5 |
|
BLAKE2b-256 | 3ad7d7e99e13db65132fccb89102373e631c66ad5564cf5025a9dca474261dcd |
File details
Details for the file nupyprop-0.1.7.post106-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post106-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.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1e303876b4d2012f7a8856723e2c52d89fdc8257e58951a5d7544e8fa7885273 |
|
MD5 | f5460bc6c187da6f6cd97b9de16c2ee2 |
|
BLAKE2b-256 | ae57a2c5394416020f4b14f47fec7200e32e1b56256309c23cb1692cd6edea66 |
File details
Details for the file nupyprop-0.1.7.post106-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post106-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.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bd457753d840b1727933604cf858d1b83c98d266aa92b6bed501a2d30ffb3d7f |
|
MD5 | 3e348218af0de183a90fba64214813e8 |
|
BLAKE2b-256 | 8ae5d27cbb66b08ee99ea3a38aca5a964f70943e6f935508a3ff492a1bb74289 |
File details
Details for the file nupyprop-0.1.7.post106-cp38-cp38-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post106-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.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0971fdd306af8798767a1905f1068a7a3f618956341340fc6eaa23492b3eb05e |
|
MD5 | 973759a0f60fb48bf66f21f84e7aeb2e |
|
BLAKE2b-256 | 5c70691c83a281dd7129181865afe29f12f4b44304c4bbfcb32d1a8938163783 |
File details
Details for the file nupyprop-0.1.7.post106-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post106-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.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 137c171d941f6f23890b02d51756ac3591b68c718f57129aa88ff205a66a8d91 |
|
MD5 | a377cf7fcdff7516ef91e1286c9ea5e9 |
|
BLAKE2b-256 | 602e7008a322e02c98379638ab790a4c5f7a33b999b3b3c91f1a332218617de1 |
File details
Details for the file nupyprop-0.1.7.post106-cp37-cp37m-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: nupyprop-0.1.7.post106-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.2 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | df6274796d2812f0cbada9fbab110134f3fbee61e918fc77350b4087b786c549 |
|
MD5 | 39c0245d41cb9ade63391f679ad6a8d9 |
|
BLAKE2b-256 | 33d2382a7d447a0457ff5792c9e25f86559adbd20fea0950ea373dc0fd51c7e0 |