https://github.com/m4opt/aep8
Calculate the flux of electrons or protons trapped in the Earth's radiation belt using the NASA AE8/AP8 model from IRBEM
https://github.com/m4opt/aep8
astronomy cubesat electron heliophysics magnetosphere nasa proton radiation satellite space-weather
Last synced: 4 months ago
JSON representation
Calculate the flux of electrons or protons trapped in the Earth's radiation belt using the NASA AE8/AP8 model from IRBEM
- Host: GitHub
- URL: https://github.com/m4opt/aep8
- Owner: m4opt
- Created: 2025-05-10T02:21:14.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-12-29T21:16:37.000Z (5 months ago)
- Last Synced: 2025-12-30T07:39:41.767Z (5 months ago)
- Topics: astronomy, cubesat, electron, heliophysics, magnetosphere, nasa, proton, radiation, satellite, space-weather
- Language: Python
- Homepage:
- Size: 771 KB
- Stars: 1
- Watchers: 2
- Forks: 3
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: licenses/IRBEM_LICENSE.txt
Awesome Lists containing this project
README
# AEP8
[](https://pypi.org/project/aep8/)
[](https://codecov.io/gh/m4opt/aep8)

This Python package calculates the estimated flux of electrons or protons trapped in the Earth's radiation belt. It is a Python wrapper for the [NASA AE8/AP8 model](https://prbem.github.io/IRBEM/api/radiation_models.html#ae8-and-ap8-models) in the [IRBEM](https://prbem.github.io/IRBEM/) package. It provides an [Astropy](https://www.astropy.org)-friendly interface, allowing you to specify the location using [Astropy coordinates](https://docs.astropy.org/en/stable/coordinates/index.html), the time in [Astropy time](https://docs.astropy.org/en/stable/time/index.html), and the energy using [Astropy units](https://docs.astropy.org/en/stable/units/index.html). You can pass it a single time and location, or arrays of times and locations.
## To install
```
pip install aep8
```
## Example
```pycon
>>> from astropy.coordinates import EarthLocation
>>> from astropy.time import Time
>>> from astropy import units as u
>>> from aep8 import flux
>>> loc = EarthLocation.from_geodetic(15 * u.deg, -45 * u.deg, 300 * u.km)
>>> time = Time('2025-01-01 18:37:22')
>>> energy = 10 * u.MeV
>>> flux(loc, time, energy, kind='integral', solar='max', particle='p')
```