rbamlib is a lightweight, open-source Python library for the analysis and modeling of radiation belts.
The library aims to support the scientific community by providing essential functionalities for radiation belt studies, with detailed documentation. This includes system properties calculations, empirical model collections, and modeling support.
Important
This library is currently in active development.
Some functions are placeholders and may not yet have full implementations. Expect ongoing updates and new features as the library evolves.
- System Properties: Adiabatic invariants transformation, drift velocities, phase space density, and motion period calculations, adaptable for different planets.
- Empirical Models Collection: Radial diffusion coefficients, lifetimes, plasma densities, and more.
- Modeling Support: Conversion between simulation grids, boundary and initial condition characteristics, adiabatic transformation of boundary scaling factors, local diffusion coefficients scaling.
The library is architected into Python packages, acting as modules containing multiple functions organized in separate files. This design allows for direct function imports from the package, streamlining usage without the need to reference specific files.
For example, pc2en function from conv package is located in conv/pc2en.py file. To use it simply import it as follows:
from rbamlib.conv import pc2enThe primary function that users should utilize is named after the file itself, ensuring intuitive access. If this main function relies on any helper functions, they are located within the same file to maintain coherence. These helper functions are kept distinct to facilitate targeted testing and validation.
The library is being developed in compliance with the Heliophysics Community (PyHC) Standards and HP Data Policy. It will be documented, tested with a planned release on Python Package Index (PyPI).
The contributions from the community are welcomed! If you're interested in contributing, please see CONTRIBUTING.md.
The package is available on PyPI:
pip install rbamlibAlternatively, you can install from source by cloning the repository:
git clone https://github.com/radiation-belts/rbamlib.git
cd rbamlib
pip install -e .Please see documentation at https://rbamlib.readthedocs.io/.
The original development of the library was supported by NASA grant 80NSSC24K0462.
Special thanks to the PlasmaPy for inspiring with their approach to building open-source scientific software. We are also grateful to the Python in Heliophysics Community (PyHC) for their guidance.
rbamlib is released under the BSD-License (3-clause version). See the LICENSE and NOTICE files for details.