Skip to main content

Cosmic-ray energy spectra

This package is deprecated. Please use the official CRDB Python package.

This Python package provides a database of published cosmic-ray energy spectra, measured by surface detectors like IceTop or the Pierre Auger Observatory; see references. Moreover, it gives access to the Cosmic-Ray DataBase (CRDB), which includes electrons, positrons, anti-protons, and nuclide up to Z = 30 for energies below the cosmic-ray knee.

Installation

The easiest way to install this project is by using pip:

pip install crspectra

Getting started

The measured cosmic-ray energy spectra can be requested via:

import crspectra

with crspectra.connect() as database:
   for experiment in database:
      spectrum = database[experiment]

A structured NumPy array is returned containing the requested cosmic-ray data. The fields are energy, flux, statistical stat and systematical sys uncertainty on the flux, and uncertainty is upper a limit uplim. The energy is given in GeV and the flux is given in GeV^-1 m^-2 s^-1 sr^-1. The uncertainties describe the lower and upper uncertainty relative to the flux.

Data from CRDB can be requested via:

spectrum = crspectra.from_external("AMS-02")

Note that CRDB also provides the papers that should be citied.

The following plot was created using this package; see the example Jupyter Notebook:

https://github.com/kkrings/crspectra/raw/main/example/crspectra.png

References

Please cite the following papers when using this database:

Auger

The Pierre Auger Collaboration, Proceedings of the 35th International Cosmic Ray Conference, Vol. ICRC2017, Proceedings of Science, 2017, p. 486

CREAM-I/III

Yoon et al., The Astrophysical Journal 839.1 (2017), p. 5

GAMMA

Ter-Antonyan, Physical Review D89.12 (2014), p. 123003

HAWC

Alfaro et al., Physical Review D96.12 (2017), p. 12201

HiRes/MIA

Abu-Zayyad et al., The Astrophysical Journal 557 (2001), pp. 686-699

HiRes-I and HiRes-II

Abbasi et al., Physical Review Letters 100 (2008), p. 101101

IceTop-73

Aartsen et al., Physical Review D88.4 (2013), p. 042004

KASCADE

Antoni et al., Astroparticle Physics 24 (2005), pp. 1-25

KASCADE-Grande

Apel et al., The Astrophysical Journal 36 (2012), pp. 183-194

Tibet-III

Amenomori et al., The Astrophysical Journal 678 (2008), pp. 1165-1179

CRDB

Maurin et al., Astronomy & Astrophysics 569 (2014), A32

CRDB v4.0

Maurin et al., Universe 6 (2020) 8, 102

Notes

I have created this database in mid of 2017 when I started writing on my PhD thesis. In case you find a publication with newer data, feel free to request its addition.

Metadata

Release files for crspectra 1.1.1

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

Source distribution (sdist)

Source distribution for crspectra 1.1.1
File Size Uploaded Provenance Actions
crspectra-1.1.1.tar.gz 28.0 kB Without provenance Details for crspectra-1.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for crspectra 1.1.1
File Interpreter ABI Platform Actions
crspectra-1.1.1-py3-none-any.whl Python 3 none any Details for crspectra-1.1.1-py3-none-any.whl

Total release size: 55.1 kB

Release files / crspectra-1.1.1.tar.gz

Download URL crspectra-1.1.1.tar.gz
Size 28.0 kB
Tags Source
SHA-256 checksum
How to use checksums
7d544bc10b53f72046b4afe1066bf58dd625ec07f23d05a9ff6b98bb5f28d9c2
BLAKE2b-256 checksum
How to use checksums
06a5c1442cf3903afc0e64103e74670bba7169dbebe8ffad03abf8b27502dd3a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.11.2 Linux/5.15.0-1033-azure

Release files / crspectra-1.1.1-py3-none-any.whl

Download URL crspectra-1.1.1-py3-none-any.whl
Size 27.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8575d2857872d658fece588fdfb2fbe3194320ee5cdec4cef4ee51501c3cdec1
BLAKE2b-256 checksum
How to use checksums
9d1f109ff5ea0589e9e544cdfcd1f0f46ee81800c7035a206fde2262ad1695cb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.4.0 CPython/3.11.2 Linux/5.15.0-1033-azure

Security for crspectra 1.1.1

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.

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