Parameterizations of the cosmic ray flux at Earth
Project description
crflux.models: parameterizations of the Cosmic Ray flux
Historically, this module was part of the research code for a paper A. Fedynitch, J. Becker Tjus, and P. Desiati, Phys. Rev. D 86, 114024 (2012), where we compared the effects of different Cosmic Ray Flux models on the atmospheric lepton flux.
This code is now an integral dependency of the atmospheric neutrino and air-shower cascade research code MCEq: Matrix Cascade Equations (MCEq) providing:
- numerical models/parameterizations of high energy cosmic ray fluxes,
- conversions from all-particle into all-nucleon flux,
- geomagnetic cutoff support (rigidity cutoff in GV),
- and other convenience functions for semi-analytical atmospheric lepton flux calculations.
Documentation
Documentation. Please acknowledge the code by citing the paper above.
Requirements
Python >= 3.9, numpy, scipy.
Installation
pip install crflux
Example
import numpy as np
import crflux.models as mods
model = mods.HillasGaisser2012("H3a")
E = np.logspace(1, 11, 100)
pfrac, p_flux, n_flux = model.p_and_n_flux(E)
# With geomagnetic cutoff of 7 GV
model_cut = mods.HillasGaisser2012("H3a", geomagnetic_cutoff=7.0)
pfrac_cut, p_cut, n_cut = model_cut.p_and_n_flux(E)
Contributors
Hans Dembinski @HDembinski
MIT LICENSE
Code and documentation copyright 2015 Anatoli Fedynitch
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 crflux-2.0.0.tar.gz.
File metadata
- Download URL: crflux-2.0.0.tar.gz
- Upload date:
- Size: 97.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
32081ad6a028fa877c12d4b0e87fc6198f5d43ffa973e69e3957f8a71012c735
|
|
| MD5 |
dfe0aa29f64fed5bbb85c3da30b46ece
|
|
| BLAKE2b-256 |
842e41b7f12937de9c74f7c5044d8a1c2bcbd66675be9d816455d1ab6583318d
|
File details
Details for the file crflux-2.0.0-py3-none-any.whl.
File metadata
- Download URL: crflux-2.0.0-py3-none-any.whl
- Upload date:
- Size: 91.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
296df1fede2271ba9aeb8f71deb33ced0398515ce6497d9ebf1632dc880f96e1
|
|
| MD5 |
a0169d36ec7004e65f8955f752110498
|
|
| BLAKE2b-256 |
af860e36bede7519007a28f92a04a95a3e7d855ba4c19d753bbe95d034334e8a
|