Skip to main content

CI PyPI version

Add diffuse neutrino flux measurements to your plots

Usage

The central object is the Spectrum. Curently implented spectral shapes are the SinglePowerLaw, BrokenPowerLaw and the LogParabola. The impleneted measurements can be found in diffuse_neutrino_flux/data/measurements.json. They can be shown by

from diffuse_neutrino_flux import Spectrum
print(Spectrum.list_available_spectra())

The spectrum can be plotted. If a contour file is available, also the corresponding butterfly can be shown. The energy_scaling parameter can be used to scale the energy axis. All other parameters are passed to the matplotlib plot function.

import matplotlib.pyplot as plt
from diffuse_neutrino_flux import Spectrum

s = Spectrum.from_key("joint15")

fig, ax = plt.subplots()
s.plot(ax=ax, label="Joint15", color="blue", energy_scaling=2)
s.plot_cl(ax=ax, color="blue", alpha=0.5, energy_scaling=2)
ax.set_xlabel("Energy [GeV]")
ax.set_ylabel("Flux [GeV cm$^{-2}$ s$^{-1}$ sr$^{-1}$]")
ax.set_xscale("log")
ax.set_yscale("log")
ax.legend()
plt.show()

Joint15 spectrum

Adding new measurements

To add a new measurement, you need to create a new entry in diffuse_neutrino_flux/data/measurements.json. To be able to plot the butterfly, you also need to create a contour file. Simply trace the contour scan in the parameter plane and add the data as a CSV file in diffuse_neutrino_flux/data/ as <new_measurement_name>_contour<confidence_level>.csv.

Metadata

Release files for diffuse-neutrino-flux 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for diffuse-neutrino-flux 0.3.0
File Size Uploaded
diffuse_neutrino_flux-0.3.0.tar.gz 11.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for diffuse-neutrino-flux 0.3.0
File Interpreter ABI Platform
diffuse_neutrino_flux-0.3.0-py3-none-any.whl Python 3 none any Details

Total release size: 23.7 kB

Release files / diffuse_neutrino_flux-0.3.0.tar.gz

Download URL diffuse_neutrino_flux-0.3.0.tar.gz
Size 11.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5a8aa8bffff03c8f2bc526c82f71f60ca01b871dc595c4ee635f4783300ecc6a
BLAKE2b-256 checksum
How to use checksums
f8f49f9020e72d6d155b7f6e533757fcb318d7ab268f246b400e79b16d13fa8b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.10.18 Linux/6.11.0-1018-azure

Release files / diffuse_neutrino_flux-0.3.0-py3-none-any.whl

Download URL diffuse_neutrino_flux-0.3.0-py3-none-any.whl
Size 12.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b2c9658e16c20bea47a57f4aed34b3c00c1733dd0c84f91a72e855ecdb53e00f
BLAKE2b-256 checksum
How to use checksums
492401eb561ed9bde27da95e4db0b78ef01028459c4e893bc3f28413af1fda7f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.1.4 CPython/3.10.18 Linux/6.11.0-1018-azure

Release history Release notifications | RSS feed

This release

0.3.0 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page