Gaussian Random-fields Approximation for Magnetic-fields with Python Algorithms (GRAMPA)
Overview
GRAMPA is a Python-based tool for modeling magnetic fields as Gaussian random fields following a specified power spectrum and electron density profile, as described in Murgia et al. (2004) and originally proposed by Tribble (1991). This framework is designed primarily for analyzing Faraday rotation experiments in galaxy clusters but can be applied more generally to other magnetized plasmas, depending on the chosen parameters.
Getting Started
To begin using GRAMPA, refer to the Jupyter notebook examples/example_cluster_Bfield.ipynb, which provides an example workflow to help users understand the implementation and features of the code.
Citation
If you use this code in your research, please cite the following works:
- Osinga et al. 2022: A&A, 665, A71
- Osinga et al. 2025: A&A, 694, A44
If your work involves lognormal density fluctuations, please also cite:
- Khadir et al. 2025 (in prep.)
- PyFC: PyFC on PiWheels
License
This software is provided under an open-source license. Please check the GitHub repository for details.
Contact
For questions or feedback, please reach out to the authors or open an issue on the Github repository
Developing
Pull requests are welcome for users that want to add features!
GRAMPA uses a set of developer tools that can be installed with
git clone git@github.com:ErikOsinga/grampa.git
cd grampa
pip install '.[dev]'
These tools can run upon git commit by using
pre-commit install
Versioning
GRAMPA will follow the Conventional Commit Message format: for versioning
- For a feature (MINOR VERSION UPDATE): (e.g. git commit -m "feat(optional scope): description")
- For a bugfix (PATCH VERSION UPDATE): (e.g. git commit -m "fix(optional scope): description")
- For a breaking change (!) (MAJOR VERSION UPDATE): (e.g. git commit -m "featorfix!(optional scope): description")
Metadata
Release files for grampa 0.0.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| grampa-0.0.7.tar.gz | 3.5 MB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| grampa-0.0.7-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 3.5 MB
Release files / grampa-0.0.7.tar.gz
| Download URL | grampa-0.0.7.tar.gz |
|---|---|
| Size | 3.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
18c77aced4177bf573826a98ba258cf00be64779f36818741ab592bc3c255ba0
|
|
BLAKE2b-256 checksum How to use checksums |
e9e180bf09bc9c2a833f95394a67fde8f960eda8d9dc176ca14211efe281767d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|
Release files / grampa-0.0.7-py3-none-any.whl
| Download URL | grampa-0.0.7-py3-none-any.whl |
|---|---|
| Size | 49.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
14ee7e1420680ad1451d491c0362cb140593307c20fcaa57a4ff999a2ef0b5a5
|
|
BLAKE2b-256 checksum How to use checksums |
37eb4f2a8594424bcb48abc06f8245885ec4f05f37a072af67c586b032abd0f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.28.1
|