Skip to main content

The PgLis model

DOI Project Status: Active – The project has reached a stable, usable state and is being actively developed. Python versions

PgLis is a model developed to forecast the flux of solar-modulated galactic cosmic-rays near Earth.

We modelled the different transport parameters that cosmic rays experience as they traverse the heliosphere to arrive at Earth (article link available soon), parametrised them as functions of solar activity, using the widely available sunspot number as a proxy (see NOAA), which we delay according to Tomassetti et al. (2022) to account for transport time.

This allows us to estimate the fluxes of cosmic nuclei near Earth, from Hydrogen to Nickel, as they evolve with solar activity.

Prediction_AMS_SSN

This package is a Python implementation that interpolated between the pre-computed tables available in Zenodo. It downloads the data from Zenodo and the sunspot numbers from NOAA.

Model Heatmap
Flux model for both solar magnetic polarities, for cosmic hydrogen.

Scientific background

The modulation of galactic cosmic rays, driven by the evolution of the heliospheric magnetic field, strongly influences the intensity of cosmic rays reaching near-Earth space. Characterizing this process is crucial both for advancing our understanding of cosmic ray transport and for assessing radiation exposure and related hazards in space environments.

Here we present the PgLis model, a newly developed forecasting framework built upon our previous work, designed for the long-term forecasting of galactic cosmic-ray fluxes.

The model is the result of a collaboration between the Università degli Studi di Perugia (Pg) and the Laboratório de Instrumentação e Física Experimental de Partículas in Lisbon (Lis), and is based on a numerical description of charged-particle transport in the heliosphere and its dependence on solar activity.

The PgLis model has been validated using multi-species flux measurements from space-based instruments such as PAMELA, AMS-02, and ACE. Its strategy is based upon Hilbert-Huang transform filtering and cross-correlation between delayed solar proxies and effective model parameters.

It demonstrates a demonstrably good performance across a broad multichannel and multi-species testing dataset, spanning different energy ranges and solar phases. These advancements enhance its applicability to space radiation monitoring and forecasting. Furthermore, when coupled with solar-proxy forecasting models, PgLis enables decadal-scale predictions of galactic cosmic-ray fluxes, thereby supporting long-term planning and radiation-risk assessment for future space missions.

Usage examples

More examples can be found in the tutorial.

Getting the flux for a given time

# setup model
model = pglis.solar_mod()

# defining the time - 2001/06/01
t = datetime.datetime(2001, 6, 1).timestamp()

# getting the flux as a dataframe
df = model.get_dataframe_flux_vs_energy(Z=1, time=t)

Installation

From GitHub

To install this package you can run the following commands:

# download the repository
git clone https://github.com/pglis-team/pglis.git

# install the package
python3 -m pip install .

From PyPi

python3 -m pip install pglis

Uninstalling the package

To remove the package you must first remove the data, this can be done by running a command that comes bundled with the package:

pglis-cleanup

To uninstall the package, regardless of the data, you can simply run the following command:

python3 -m pip uninstall pglis

Authors

David Pelosi1,2, Fernando Barão3,4, Bruna Bertucci1,2, Emanuele Fiandrini1,2, Miguel Orcinha2 and Nicola Tomassetti1,2

1 Università degli Studi di Perugia, Perugia 06100, Italy
2 INFN - Perugia, Perugia 06100, Italy
3 Laboratório de Instrumentação e Física Experimental de Partículas, Lisboa 1000, Portugal
4 Instituto Superior Técnico, Lisboa 1049, Portugal

PgLis Logo

Maintainers

David Pelosi1,2 E-mail
Miguel Orcinha2 E-mail

How to cite

This package was created to simplify and systematise the access to the flux model presented in the article Pelosi et al. (2026) New model for long-term forecasting of galactic cosmic rays, Phys. Rev. D 114, 063005, DOI:10.1103/npfk-lwy9.

The heatmaps with the discretised model used in this package can be found in Zenodo.

Acknowledgements

This work as been developped with support from Agenzia Spaziale Italiana (ASI), under ASI-UniPG 2019-2-HH.0, ASI-INFN 2019-19 HH.0, its amendment 2021-43 HH.0, the Italian Ministry of University and Research (MUR) through the program "Dipartimenti di Eccellenza 2023-2027" and Fundação para a Ciência e Tecnologia (FCT) under grant 2024.00992.CERN, Portugal.

Metadata

Release files for pglis 1.0.3

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

Source distribution (sdist)

Source distribution for pglis 1.0.3
File Size Uploaded Provenance Actions
pglis-1.0.3.tar.gz 29.9 kB Without provenance Details for pglis-1.0.3.tar.gz

Built distribution (wheel)

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

Total release size: 58.8 kB

Release files / pglis-1.0.3.tar.gz

Download URL pglis-1.0.3.tar.gz
Size 29.9 kB
Tags Source
SHA-256 checksum
How to use checksums
b9afce5ede3df6d15a6b1c9ce5a9270bea706272814fdd46ceea33e0be0ca7d0
BLAKE2b-256 checksum
How to use checksums
4fba280fef6e06f3a523e2da6ccd94c91f6b2765865d1e1e230a2325c51e81cc
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Release files / pglis-1.0.3-py3-none-any.whl

Download URL pglis-1.0.3-py3-none-any.whl
Size 28.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5b5f04b0b47df143389f114b55d18fa416de22a86cb4bddccea774ae2f2b033c
BLAKE2b-256 checksum
How to use checksums
03388268ab09f51a226d71aed8c09c24dc4fc492b49f5d13827cf29a6c5f00f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.13

Security for pglis 1.0.3

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