Skip to main content

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 folder called plotting_tutorial in the current repository, for visualizing output from the code and creating user-defined models.

Citation: Please cite “Neutrino propagation in the Earth and emerging charged leptons with nuPyProp”, D. Garg, S.Patel et al. (NuSpaceSim Collaboration), e-Print: arXiv:2209.15581 [astro-ph.HE, hep-ph], submitted for publication in Journal of Cosmology and Astroparticle Physics.

Acknowledgments: This work is supported by NASA grants 80NSSC19K0626 at the University of Maryland,Baltimore County, 80NSSC19K0460 at the Colorado School of Mines, 80NSSC19K0484 at theUniversity of Iowa, and 80NSSC19K0485 at the University of Utah, 80NSSC18K0464 at LehmanCollege, and under proposal 17-APRA17-0066 at NASA/GSFC and JPL.

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:

  1. -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.

  2. -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.

  3. -i or --idepth: depth of ice/water in km. Default value is 4 km.

  4. -cl or --charged_lepton: flavor of charged lepton used to propagate. Can be either muon or tau. Default is tau.

  5. -n or --nu_type: type of neutrino matter. Can be either neutrino or anti-neutrino. Default is neutrino.

  6. -t or --energy_loss: energy loss type for lepton - can be stochastic or continuous. Default is stochastic.

  7. -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.

  8. -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.

  9. -el or --energy_lepton: option to print exiting charged lepton’s final energy in output file. Default is no

  10. -f or --fac_nu: rescaling factor for BSM cross-sections. Default is 1.

  11. -s or --stats: statistics or no. of injected neutrinos. Default is 1e7 neutrinos.

  12. -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.

Note: This program uses OpenMP for propagating the huge number of neutrinos injected. For this purpose, the code will use all the threads available in your processor by default. To control the number of threads used for running the code, use export OMP_NUM_THREADS=x, where x is the number of threads you want the code to run with.

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_Ckm_D_E_F_G, where

A = Neutrino type: nu is for neutrino & anu is for anti-neutrino.
B = Charged lepton type: tau is for tau leptons & muon is for muons.
C = idepth: depth of water layer (in km).
D = Neutrino (or anti-neutrino) cross-section model.
E = Charged lepton photonuclear energy loss model.
F = Energy loss type: can be stochastic or continuous.
G = Statistics (ie. no. of neutrinos/anti-neutrinos injected).

Model Tables

Neutrino/Anti-Neutrino Cross-Section Model

Reference

Abramowicz, Levin, Levy, Maor (ALLM)

hep-ph/9712415, Phys. Rev. D 96, 043003

Block, Durand, Ha, McKay (BDHM)

Phys. Rev. D 89, 094027, Phys. Rev. D 96, 043003

CTEQ18-NLO

Phys. Rev. D 103, 014013, Phys. Rev. D 81, 114012

Connolly, Thorne, Waters (CTW)

Phys. Rev. D 83, 113009

nCTEQ15

Phys. Rev. D 93, 085037, Phys. Rev. D 81, 114012

User Defined

See nuPyProp tutorial repository

Charged Lepton Photonuclear Energy Loss Model

Reference

Abramowicz, Levin, Levy, Maor (ALLM)

hep-ph/9712415, Phys. Rev. D 63, 094020

Bezrukov-Bugaev (BB)

Yad. Fiz. 33, 1195, Phys. Rev. D 63, 094020

Block, Durand, Ha, McKay (BDHM)

Phys. Rev. D 89, 094027, Phys. Rev. D 63, 094020

Capella, Kaidalov, Merino, Tran (CKMT)

Eur. Phys. J. C 10, 153 Phys. Rev. D 63, 094020

User Defined

See nuPyProp tutorial repository

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:

  1. data.py: contains functions for reading/writing from/to hdf5 files.

  2. geometry.py: contains the Earth geometry modules (including PREM) for use with python/fortran.

  3. models.py: contains neutrino cross-section & charged lepton energy loss model templates.

  4. 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.

  5. 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.

  6. 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).

  1. Install the non-pypi required dependencies as described for users above.

  2. Install a fortran compiler. ex: sudo apt-get install gfortran

  3. git clone the source code: git clone git@github.com:NuSpaceSim/nupyprop.git

  4. cd nupyprop

  5. 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.

  1. Install the non-pypi required dependencies as described for users above.

  2. Install a fortran compiler. ex: brew install gcc

  3. git clone the source code: git clone git@github.com:NuSpaceSim/nupyprop.git

  4. cd nupyprop

  5. 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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

nupyprop-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.4 MB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

nupyprop-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.11 macOS 10.9+ x86-64

nupyprop-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.3 MB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

nupyprop-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.10 macOS 10.9+ x86-64

nupyprop-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.3 MB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

nupyprop-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

nupyprop-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (16.3 MB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

nupyprop-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl (16.5 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

File details

Details for the file nupyprop-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nupyprop-1.0.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 5f7293efeff538a02b3779f4ffc7f80b299c95734a054d3c60717170f62a8912
MD5 b747b7de7fd7c54d58cd3f9028918492
BLAKE2b-256 29e9a169ba6facaf913c33996823ed6885dced872c07381a05b3e23ecc26724b

See more details on using hashes here.

File details

Details for the file nupyprop-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for nupyprop-1.0.1-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 a46111e5a175ab679df96b915fb2ddb3400bc31bee8733f386215722a9604e35
MD5 eddae5d7d7b43d3dd38d8cb75e400b24
BLAKE2b-256 27960b54a22a592cfae790d719c2a6e6e39ffc6279fdba5ee6395e24dd6c83cc

See more details on using hashes here.

File details

Details for the file nupyprop-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nupyprop-1.0.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 67421f0707afba049fd6e93e7defb4fd8958b053eedc71133d34217283c1b72d
MD5 6b581942a78ec3e8e6e8ca8373dc2f11
BLAKE2b-256 9b8c2ea36112e6f41026335eefb191270f2e5303f73b0db457852506f9c35fdf

See more details on using hashes here.

File details

Details for the file nupyprop-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for nupyprop-1.0.1-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 5b4779e7cb8b70c922502c5c4aed08d072a46b47b90e00c13e1a49f25e9311b5
MD5 33e5498864fdaeff034b3e11a65bd27f
BLAKE2b-256 1e0653494753e616b8eb5471a991c88983e19d01863f6f42bc46ae64e5bba4be

See more details on using hashes here.

File details

Details for the file nupyprop-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nupyprop-1.0.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 95f5c967690c38ef84db6715ed644871aead0b405bf143354d6ebdaa6ba048a7
MD5 3fae320f11f6fa9c92306ba188bf2d3e
BLAKE2b-256 997759d35e5111d324d08ba03239fbff381d685ae3042ba03c7b353276836538

See more details on using hashes here.

File details

Details for the file nupyprop-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for nupyprop-1.0.1-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 66ce000094a025a67cd3c93f818bcc83c66dfd3ce495ac79273394e5d58c3ef1
MD5 925930333641aa5207636df7499a2714
BLAKE2b-256 8b84247d16c2862d3c19b672df55e4a7df95437900a72f659458dc346a8e422e

See more details on using hashes here.

File details

Details for the file nupyprop-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for nupyprop-1.0.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 7f2ced009f19579701372323e90bc97f766e489b8645fbd032a6676a61a20925
MD5 dcb90698a4eb78fe8297c925dce208e4
BLAKE2b-256 498b199af51dc075d625eba7f5747fc23c442c652b95a824c74ee7c58cebbc4a

See more details on using hashes here.

File details

Details for the file nupyprop-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for nupyprop-1.0.1-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 0f9138945ee5cc852669c43c2b414c951141e9791e8751e891716a41b278685b
MD5 185e41f0b56107cbe0288133bde82a80
BLAKE2b-256 022aa0b78db3b4d2aeedc4af4a3a71639803c72bd04bb32254bf2d9c633cd77b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page