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()
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| diffuse_neutrino_flux-0.3.0.tar.gz | 11.2 kB | Without provenance | Details for diffuse_neutrino_flux-0.3.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| diffuse_neutrino_flux-0.3.0-py3-none-any.whl | Python 3 | none | any | Details for diffuse_neutrino_flux-0.3.0-py3-none-any.whl |
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
|
Security for diffuse-neutrino-flux 0.3.0
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.