Skip to main content

Astropy-friendly wrapper for the AE-8/AP-8 Van Allen belt model

Project description

radbelt: An Astropy-friendly wrapper for the AE-8/AP-8 Van Allen belt model

This is small Python library to model the fluxes of charged particles trapped in the Van Allen belt. It provides a fast, simple, and convenient Python interface to the International Geomagnetic Reference Field (IGRF) model and NASA's AE-8/AP-8 models of electron and proton fluxes, which are both implemented in Fortran. The package is integrated with the Astropy ecosystem for easy conversion of coordinate systems, time scales, and units. With this package, it is easy and fast to determine the flux of particles above any given energy, at any position, at any time.

Acknowledging radbelt

This package is wraps the following Fortran codes, which have been retrieved from NASA Goddard Space Flight Center's (GSFC) Community Coordinated Modeling Center (CCMC):

When publishing results derived from this Python package, please cite the following articles:

To install

$ pip install .

Example

>>> from radbelt import get_flux
>>> from astropy import units as u
>>> from astropy.coordinates import EarthLocation
>>> from astropy.time import Time
>>> coords = EarthLocation(-45 * u.deg, -30 * u.deg, 500 * u.km)
>>> time = Time('2021-03-01')
>>> energy = 20 * u.MeV
>>> get_flux(coords, time, energy, 'p', 'max')  # doctest: +FLOAT_CMP
<Quantity 2642.50268555 1 / (s cm2)>

Known issues

  • The CCMC IGRF code has spatially varying errors of a few percent, which will result in a striped pattern in the resulting particle flux.
  • This package does not support Windows yet. If you are a Windows developer, then please help us out by contributing a pull request! Meanwhile, if you need to use this package on Windows, then we recommend using Python under Linux within Windows Subsystem for Linux (WSL), Docker, or a virtual machine. See https://github.com/nasa/radbelt/issues/47.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

radbelt-0.1.5.tar.gz (135.1 kB view hashes)

Uploaded Source

Built Distributions

radbelt-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

radbelt-0.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (653.9 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ ARM64

radbelt-0.1.5-cp311-cp311-macosx_10_9_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.11 macOS 10.9+ x86-64

radbelt-0.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

radbelt-0.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (654.2 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ ARM64

radbelt-0.1.5-cp310-cp310-macosx_10_9_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.10 macOS 10.9+ x86-64

radbelt-0.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (1.2 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

radbelt-0.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl (651.8 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ ARM64

radbelt-0.1.5-cp39-cp39-macosx_10_9_x86_64.whl (1.4 MB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page