Skip to content

VasundharaShaw/Cosmic_Ray_Diffusion

Repository files navigation

Cosmic_Ray_Diffusion

Python 3.10+
CRPropa3
License: MIT

This repository provides tools to calculate cosmic-ray particle diffusion using the forward-tracking scheme implemented in CRPropa3.
It is intended for researchers working on cosmic-ray propagation, diffusion studies, and comparisons with analytical models.

📄 Please see the related publication for methodological details: arXiv:2501.16881.


🚀 Features

  • Forward tracking of charged particles using CRPropa3
  • Calculation of diffusion coefficients in turbulent magnetic fields
  • Integration with Healpy for sky-map projections
  • FITS file support via Astropy
  • Modular and reproducible workflow

📦 Requirements

This code requires Python 3.10+ and the following packages:

Package Recommended Version
CRPropa3 3.2+
numpy 1.23+
healpy 1.16+
astropy 5.3+
scipy 1.10+
matplotlib 3.7+

⚠️ Ensure that your numpy and other libraries are compatible with the installed CRPropa3 version.
Using a virtual environment (conda or venv) is highly recommended.


⚙️ Installation

Clone the repository and set up your environment:

git clone https://github.com/<your-username>/Cosmic_Ray_Diffusion.git
cd Cosmic_Ray_Diffusion

conda create -n crdiff python=3.10
conda activate crdiff

pip install numpy==1.23.5 healpy==1.16.5 astropy==5.3 scipy==1.10 matplotlib==3.7

## 📚 Reference

If you use this repository in your research, please cite:

- V. Shaw et al., *Galactic halo bubble magnetic fields and UHECR deflections*,  
  MNRAS 517, 2534 (2022)  

- V. Shaw et al., *Influence of the Galactic Halo on the UHECR Multipoles*,  
  [arXiv:2501.16881](https://arxiv.org/abs/2501.16881), under review at MNRAS

About

This repository calculates the particle diffusion using the cosmic ray propagtion code CRPropa3

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages