Skip to content

ErikOsinga/grampa

Repository files navigation

Gaussian Random-fields Approximation for Magnetic-fields with Python Algorithms (GRAMPA)

GRAMPA logo - Credit: OpenAI

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

Install GRAMPA from PyPI with

pip install grampa

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:

If your work involves lognormal density fluctuations, please also cite:

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")

About

Python package for simulating astrophysical magnetic fields.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages