Daemonflux is a tabulated/splined version of the an atmospheric flux model calibrated on muon spectrometer data. For the details about how daemonflux is built and calibrated to muon data the following publication.
@article{Yanez:2023lsy,
author = "Ya\~nez, Juan Pablo and Fedynitch, Anatoli",
title = "{daemonflux: DAta-drivEn MuOn-calibrated Neutrino Flux}",
eprint = "2303.00022",
archivePrefix = "arXiv",
primaryClass = "hep-ph",
month = "2",
year = "2023"
}
Python > 3.7,numpy,scipymatplotlibfor examples
a) From PyPi:
pip install daemonflux
b) From source in editable mode, so the package gets updated after each git pull:
$ git clone https://github.com/mceq-project/daemonflux
$ cd daemonflux
$ python3 -m pip install -e .To see more features and a detailed example, refer to the example notebook. In summary, the process of calculating calibrated fluxes from the provided tables is as follows:
from daemonflux import Flux
import numpy as np
import matplotlib.pyplot as plt
daemonflux = Flux(location='generic')
egrid = np.logspace(0,5) # Energy in GeV
fl = daemonflux.flux(egrid, '15', 'numuflux')
err = daemonflux.error(egrid, '15', 'numuflux')
plt.loglog(egrid, fl, color='k')
plt.fill_between(egrid, fl + err, fl - err,
color='r', alpha=.3, label=r'1$\sigma$ error')
...
Resulting in the following figure:
For neutrinos, the methods Flux.flux and Flux.error return values in the units of
The quantities are:
- muons:
muflux,muratio,mu+,mu-, - muon neutrinos:
numuflux,numuratio,numu,antinumu,flavorratio - electron neutrinos:
nueflux,nueratio,nue,antinue,flavorratio
Those titled XXXflux are the sum of particle and antiparticle fluxes numuflux = numu + antinumu, the ratio is numuratio = numu/antinumu, and the is defined as flavorratio = (numu + antinumu)/(nue + antinue).
The total_ quantities, such as total_muflux, represent the total flux, which includes both conventional and prompt atmospheric fluxes. However, unlike the conventional flux, the prompt flux is not calibrated using the daemonflux method, as surface muons are not sensitive to prompt fluxes. As a result, the prompt component does not include correction parameters or errors. It is important to note, however, that the conventional part of the flux remains calibrated, so the total_ flux is simply the sum of the calibrated conventional and uncalibrated prompt fluxes.
Besides the pickled spline files of earlier releases, daemonflux reads response
files in HDF5 (format version 2): one file per dataset, which can be combined in
one Flux with spl_file=[...] or a sha256-verified bundle manifest with
Flux(bundle=...). Sums and ratios are formed from the stored species, so their
uncertainties are exact. See docs/response-format.md
for the layout, the response model and the converter for legacy files.
A response file can also describe a site's sky map: fluxes by zenith and azimuth (e.g. a 3D calculation with the geomagnetic cutoff), joined to a 1D table above a given energy window. Such a site takes the azimuth as an argument:
flux = Flux(bundle="kamioka.bundle.json")
flux.flux(E, 95.0, "numuflux", exp="Kamioka", azimuth_deg=90.0)
flux["Kamioka"].error(E, 95.0, "numuflux", azimuth_deg=90.0)See Sky maps.
The parameters of the model are correlated. These correlations are drdetermined from the data we have used for the fit. The errors are already computed taking the covariance matrix into account when using the error method. If daemonflux is used in a fit with free floating parameters, one can include these correlations by adding the chi2 as additional penalty term. The chi2 for the current combination of parameters can be obtained by calling flux.chi2({dictionary of modified parameters}).
