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):
- https://ccmc.gsfc.nasa.gov/models/modelinfo.php?model=IGRF
- https://ccmc.gsfc.nasa.gov/models/modelinfo.php?model=AE-8/AP-8%20RADBELT
When publishing results derived from this Python package, please cite the following articles:
- Vette, J.I., Lucero, A.B., Wright, J.A., et al. 1966, "Models of the Trapped Radiation Environment." NASA SP-3024.
- Sawyer, D.M. & Vette, J.I. 1976, "AP-8 trapped proton environment for solar maximum and solar minimum." NASA WDC-A-R&S 76-06, NASA-TM-X-72605.
- Vette, J.I. 1991, "The AE-8 trapped electron model environment." NSSDC/WDC-A-R&S 91-24.
- Thébault, E., Finlay, C.C., Beggan, C.D., et al. 2015, "International Geomagnetic Reference Field: the 12th generation." Earth, Planets, and Space, 67, 79.
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
Built Distributions
Hashes for radbelt-0.1.5-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b176e8fc3f127bf04de4810c1ad19245f723d419d8296b251f097946fa6937f1 |
|
MD5 | bf6604b7aeff9a85a9524cefa081d8d1 |
|
BLAKE2b-256 | 2c82ebca89badec37c29808fabb066c9e1183832f8d6734a32d89e56f824d810 |
Hashes for radbelt-0.1.5-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 70dab01d64582d98b7c3d6a396c310ef6233add3c4f511f9d13d2c0bed7a0f84 |
|
MD5 | 079d4ce1286d74d79bc87bd2ab134a63 |
|
BLAKE2b-256 | bd409d02f1d8ccf4da580249dfab8708199cc42fb2545a910976eb7c0bc40efa |
Hashes for radbelt-0.1.5-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84c7ee844e118f7f40f1a4532678cc33c9154a0f425ab758ae3123aab692aac0 |
|
MD5 | fb0e631a8b56caeebe0c2f6c55cfe35d |
|
BLAKE2b-256 | 312a692aaaf2599893c85395dc06f856e72ba9ae331a1b3221e260ca7eece55e |
Hashes for radbelt-0.1.5-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 849eae0038153e13d0bc81cb1061a41cd1a8e9a64b67286bf92868929b9c3ff2 |
|
MD5 | a302e01cddbf2fc0226a8ceb27615988 |
|
BLAKE2b-256 | 6faac696cae3710e446384e6b54cc95b4282d0b7c40f41f4d840639c8863f38a |
Hashes for radbelt-0.1.5-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 96b7da2fdf703a690dcf06482878a230fb4c50c1d61cbe56db5e92a01cbd2f79 |
|
MD5 | 234d807fbfb109b6a65e427c888850b8 |
|
BLAKE2b-256 | 3b23550c43178f97d5b606622e1a63c6158ca1dad0c43666d88ca949c720fa63 |
Hashes for radbelt-0.1.5-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39185af9ea2baaba8fd2137800a8b8ceb21d58203358a1d1557e513d92e677ee |
|
MD5 | 6d40532f0dbc3bfec72ce6a89dfebf3d |
|
BLAKE2b-256 | 21f3fd2d72c8f99e8bdb4c1a52b3c0c2b0e20465536af2b5d234fcebf63e8a2b |
Hashes for radbelt-0.1.5-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b4099d81d6dac5fae626f3c7d44f7298dc976c4143be70ddc40ab1f82121630 |
|
MD5 | 176d3108292665006fe1e216013807bb |
|
BLAKE2b-256 | d213929d34c7c12db0e8e587c98a46f1c992f9f5bb900ab4a6589134b43a6ff9 |
Hashes for radbelt-0.1.5-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5a9d911ffee59a3b43207f24d8a41473aa010952a1c9f7f41eb8c3e55dab1e9b |
|
MD5 | d0db950550e53cd7a7dd71da5f00f902 |
|
BLAKE2b-256 | a180768626f10b3669606453ac69903ba4d6e960f7fb60faa36ed0f60daa635a |
Hashes for radbelt-0.1.5-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3be277cc3eb8aaf70503f32ca7d3aab1fd73b7d8fdb97655667b709b1124b903 |
|
MD5 | 5c83418fbecb44faa3410883446cf927 |
|
BLAKE2b-256 | 4e53c200ea67b396c6407d4afba4f0ccbe05dc48949552ededb1314fb41d71df |