nuflux
Nuflux is a library for calculating atmospheric neutrino fluxes.
Installation
Packages
nuflux is available on pypi.
If you only need to use nuflux in python this is the easiest way to install it.
Run pip install nuflux.
nuflux is packaged on conda-forge. Install with conda install -c conda-forge nuflux.
On MacOS you can use homebrew. IceCube maintains a tap which includes a formulat for nuflux. Run:
brew tap "icecube/icecube"
brew install nuflux
From source
nuflux uses two different build systems: one based on setuptools and one based on meson. Which one you should use depends on whether you need to build C++ libraries against nuflux, or are content to use the Python bindings.
Prerequisites
- cfitsio
- photospline
- boost_python
setuptools
If you only need to use python you can install it directly through pip:
pip install --user git+https://github.com/icecube/nuflux
Note that this may fail if photospline and boost_python are installed in nonstandard locations, e.g. headers in /opt/toolsets/photospline/include, libraries in /opt/toolsets/photospline/lib. In this case, set the CMAKE_PREFIX_PATH environment variable to the root of your photospline installation and BOOST_ROOT to the root of your boost installation:
CMAKE_PREFIX_PATH=/opt/toolsets/photospline BOOST_ROOT=/opt/toolsets/boost pip install --user git+https://github.com/icecube/nuflux
If you are running it in IceCube's cvmfs environment you will want to set CMAKE_PREFIX_PATH and BOOST_ROOT to the base of the cvmfs environment which is stored in the environment variable SROOT:
eval `/cvmfs/icecube.opensciencegrid.org/py3-v4.3.0/setup.sh`
CMAKE_PREFIX_PATH=${SROOT} BOOST_ROOT=${SROOT} pip install --user git+https://github.com/icecube/nuflux
Meson
If you want to use nuflux from a c++ program you need to install it with meson
git clone https://github.com/icecube/nuflux
cd nuflux
meson build
ninja -C build
sudo ninja -C build install
If boost and photospline are installed in nonstandard locations, you might need to let meson know with environment variables. Since photospline is detected with cmake you need to set CMAKE_PREFIX_PATH=/path/to/photospline. Boost uses BOOST_ROOT.
For example, in IceCube's cvmfs environment you should do:
CMAKE_PREFIX_PATH=${SROOT} BOOST_ROOT=${SROOT} meson setup build . --prefix=/path/to/install/to
the option -Ddata_path can be used to install the raw flux tables to a directory outside of the PREFIX directory.
If you want to install to a read-only file system you can pass -Dinstall_data=False
You may also use the environment variable NUFLUX_DATA to specify the path of the raw flux tables if they are in a
place other than where they were installed to.
Documentation
You can build the documentation yourself using sphinx:
pip3 install sphinx breathe sphinx_rtd_theme
Run ninja with docs/html target:
ninja docs/html
The latest version of the documentation is automatically uploaded to IceCube documentation server
Usage
From python:
>>> import nuflux
>>> flux = nuflux.makeFlux('honda2006')
>>> nu_type=nuflux.NuMu
>>> nu_energy=1e3 # in GeV
>>> nu_cos_zenith = 0.5
>>> flux.getFlux(nu_type,nu_energy,nu_cos_zenith)
2.2395566552347364e-11
from c++:
#include <nuflux/nuflux.h>
int main(){
boost::shared_ptr<nuflux::FluxFunction> flux;
flux=nuflux::makeFlux("honda2006");
nuflux::ParticleType pdgid = nuflux::NuMu;
double energy = 1e3; // in GeV
double cos_zenith = 0;
double f = flux->getFlux(pdgid, energy, cos_zenith);
assert(f == 4.6476245267530432e-11);
}
Metadata
Release files for nuflux 2.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| nuflux-2.0.7.tar.gz | 4.3 MB | Without provenance | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| nuflux-2.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.17+ x86-64 | Details |
| nuflux-2.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.11 | CPython 3.11 | Linux glibc 2.17+ x86-64 | Details |
| nuflux-2.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.10 | CPython 3.10 | Linux glibc 2.17+ x86-64 | Details |
| nuflux-2.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.9 | CPython 3.9 | Linux glibc 2.17+ x86-64 | Details |
| nuflux-2.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.8 | CPython 3.8 | Linux glibc 2.17+ x86-64 | Details |
| nuflux-2.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | CPython 3.7 | CPython 3.7 pymalloc | Linux glibc 2.17+ x86-64 | Details |
Total release size: 50.5 MB
Release files / nuflux-2.0.7.tar.gz
| Download URL | nuflux-2.0.7.tar.gz |
|---|---|
| Size | 4.3 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fda399992fa1510845fc0224cc9b5857169f98c2687eb965de67a87a916a7cb2
|
|
BLAKE2b-256 checksum How to use checksums |
fe2aa5c98b60d16f35ff699ece238cc944e87ef76102754c841e6aaa0a0c9aae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / nuflux-2.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nuflux-2.0.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 7.7 MB |
| Tags | CPython 3.12 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
ee9e1e30da21bcc9f341d8c343ae86d3c81f4d126a82609b991f751186446a76
|
|
BLAKE2b-256 checksum How to use checksums |
e14f28ae3c5c401657ca7cabae0ff01d46b4efccdf59c3683f9e49feab0995b8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / nuflux-2.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nuflux-2.0.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 7.7 MB |
| Tags | CPython 3.11 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
e48e7bde9ac56ee93e5308583231db2517b583dec9cd39878b9e5e380da5e6d5
|
|
BLAKE2b-256 checksum How to use checksums |
606df8daedadd775878a1dc793916ecde0da2ccac31d8374486858ce516a9064
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / nuflux-2.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nuflux-2.0.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 7.7 MB |
| Tags | CPython 3.10 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
fdb84c23c4da3798ad5308e2059d49c3f7706f35e7f9fa889ee0497b19d0870e
|
|
BLAKE2b-256 checksum How to use checksums |
fccebc9580323d5c58cd4f8a4ea9cf14ce2533d0ded74979a35c2d4987be2963
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / nuflux-2.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nuflux-2.0.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 7.7 MB |
| Tags | CPython 3.9 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
6bfe80a4d7d36ead1cae275d96683468d52d3ff6b9f7214926c434342c39869c
|
|
BLAKE2b-256 checksum How to use checksums |
c3a457962d737899f3b15940cdc779480ff7a2aca699dd9c5412f251df2418ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / nuflux-2.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nuflux-2.0.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 7.7 MB |
| Tags | CPython 3.8 Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
2c6e0c980cd96a4a19008227cc1babf00707595a38b416fd01ad4e1f6edb4cb2
|
|
BLAKE2b-256 checksum How to use checksums |
afb76e8a340deaf0545a09cb83911ed737b125efa766d83243f08900eda707e3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Release files / nuflux-2.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
| Download URL | nuflux-2.0.7-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl |
|---|---|
| Size | 7.7 MB |
| Tags | CPython 3.7 CPython 3.7 pymalloc Linux glibc 2.17+ x86-64 |
|
SHA-256 checksum How to use checksums |
22bbde304c719427d4886cfbddfb1fea1e085f20af529829f4915d93ca6b0190
|
|
BLAKE2b-256 checksum How to use checksums |
af7a3fc872f20cdae9858ead64787ebd586f005a2370655503dc860ada90c986
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.4
|
Security for nuflux 2.0.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.