Package implements the formalism for calculating passing fraction as discussed in JCAP07(2018)047.
Project description
nuVeto
This package calculates the effect of a detector veto, triggered by the accompanying muons from the same air shower, on the high-energy atmospheric neutrino flux. The calculated result is the passing-flux or passing-fraction of atmospheric neutrinos as a function of energy and zenith angle.
As a corollary, the total atmospheric neutrino flux as well as parent particle fluxes at various depths in the atmosphere are calculated using MCEq. To illustrate, the parent fluxes are accessible as shown in this example.
In the right panel, solid lines are direct calculations from MCEq while dashed lines are an extension down to lower energies where the parent particle is assumed to no longer interact and their fluxes are computed based on the CR flux, cross section, yield and parent's decay length.
Getting started
It is recommended to work within a Python virtual environment.
python3 -m venv vdir
source vdir/bin/activate
Installing
pip install nuVeto
This will install numpy, scipy, pandas and MCEq. By default this will not install MKL or CUDA libraries that accelerate MCEq. If your system has the right hardware available, it is possible get a substantial speed up with pip install mkl or pip install MCEq[cuda]. The fastest library is automatically chosen.
As of v2.3.1 a suite of tests is also packaged. It uses pytest, which can be optionally installed and run as follows.
pip install nuVeto[testing]
pytest --pyargs nuVeto
Additional optional dependencies are [plotting] and [pythia8] which will respectively install needed packages for making example plots (from nuVeto.examples import plots), and generating alternative hadron decay rates with PYTHIA.
Note that v2.0 and higher rely on the updated version of MCEq. For the legacy version that relies on MCEq_classic do git checkout v1.5 and follow the instructions in the README.
Usage
The simplest way to run is
from nuVeto import passing
from nuVeto.utils import Units
import crflux.models as pm
enu = 1e5*Units.GeV
cos_theta = 0.5
pf = passing(enu, cos_theta, kind='conv nu_mu',
pmodel=(pm.HillasGaisser2012, 'H3a'),
hadr='SIBYLL2.3c', depth=1950*Units.m,
density=('CORSIKA', ('SouthPole','December')))
where kind can be (conv|pr|_parent_) nu_(e|mu)(bar)
See examples/plots.py for more detailed examples.
Building muon detection probabilities
To calculate the passing fraction requires knowing the muon detection probability as a function of the overburden and energy of the muon at the surface. This is constructed from a convolution of the muon reaching probability and the detector response. The scripts for generating the necessary files are provided in the scripts/mu/ subdirectory, which can be obtained with a download or clone of this repository.
The muon reaching probability is constructed from MMC simulations and is provided for propagation in ice and water in data/mmc/(ice|water)_(allm97|bb).npz for two different cross section parameterizations. The detector response probability must first be defined in scripts/mu/pl.py as a function of the muon energy at the detector. Then, pass the function name to the --plight argument and construct the overall muon reaching and detection probability with the following command, for example.
cd scripts/mu
./mu.py ice_allm97 -o mymudet.npz --plight pl_step_1000
To use the newly generated file, pass the stem without file extension as a string to the prpl argument.
passing(enu, cos_theta, prpl='mymudet')`.
For many different characterisations of the detector response (e.g. for different depths or different directions) this process can be inconvenient. In this case one can also directly use a function for pl:
from nuVeto.mu import interp
pl=lambda emu: #some function of muon energy
prpl=interp("ice_allm97",pl)
enu=1e3
cos_theta=0.5
pf = passing(enu, cos_theta, prpl=prpl)
Contributers
Carlos Arguelles, Sergio Palomares-Ruiz, Austin Schneider, Logan Wille, Tianlu Yuan
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 Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nuveto-2.7.0.tar.gz.
File metadata
- Download URL: nuveto-2.7.0.tar.gz
- Upload date:
- Size: 12.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5673ac8847b9e5b4172e4ac4b0c969d1c0c35c141731d2b88e1a439f8a49ed62
|
|
| MD5 |
d5086173136cd7bb275fc100266c3657
|
|
| BLAKE2b-256 |
50513a1dbd7f187387507610aee07872c7ac1315b32c54180d66fe31a1ae828d
|
Provenance
The following attestation bundles were made for nuveto-2.7.0.tar.gz:
Publisher:
publish.yml on tianluyuan/nuVeto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nuveto-2.7.0.tar.gz -
Subject digest:
5673ac8847b9e5b4172e4ac4b0c969d1c0c35c141731d2b88e1a439f8a49ed62 - Sigstore transparency entry: 847053422
- Sigstore integration time:
-
Permalink:
tianluyuan/nuVeto@c0764a5acddc3727861bc77f09d55f6edecfd31f -
Branch / Tag:
refs/tags/v2.7.0 - Owner: https://github.com/tianluyuan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c0764a5acddc3727861bc77f09d55f6edecfd31f -
Trigger Event:
push
-
Statement type:
File details
Details for the file nuveto-2.7.0-py3-none-any.whl.
File metadata
- Download URL: nuveto-2.7.0-py3-none-any.whl
- Upload date:
- Size: 12.1 MB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1176fe684814acb6ad9e4fb779ef9ac98436db95a38ca2e0cf4a879fc05f57d8
|
|
| MD5 |
8ee1719c6d85cffb7361b253b999cca2
|
|
| BLAKE2b-256 |
97a5a6a041c51edd8728146400b758d4cf48e3979f5d56e79ee99759098da7c8
|
Provenance
The following attestation bundles were made for nuveto-2.7.0-py3-none-any.whl:
Publisher:
publish.yml on tianluyuan/nuVeto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
nuveto-2.7.0-py3-none-any.whl -
Subject digest:
1176fe684814acb6ad9e4fb779ef9ac98436db95a38ca2e0cf4a879fc05f57d8 - Sigstore transparency entry: 847053473
- Sigstore integration time:
-
Permalink:
tianluyuan/nuVeto@c0764a5acddc3727861bc77f09d55f6edecfd31f -
Branch / Tag:
refs/tags/v2.7.0 - Owner: https://github.com/tianluyuan
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c0764a5acddc3727861bc77f09d55f6edecfd31f -
Trigger Event:
push
-
Statement type: