New open-source Python-based software boosts space-weather modelling

Free, community-friendly tool makes it easier for scientists to model how electromagnetic waves affect high-energy particles in space.

Sun 'rising' over Earth

University of Birmingham experts have created open-source computer software that helps scientists understand how fast-moving particles behave when they interact with electromagnetic waves in space.

Understanding how particles behave in Earth’s radiation belts is crucial because high-energy electrons can damage satellites, whilst radiation belt dynamics affect space-weather forecasts. Better models help protect astronauts, power systems, and communications infrastructure.

Publishing their findings in Earth and Space Science, researchers describe these changes using mathematical tools known as ‘diffusion coefficients’. These are extremely hard to calculate because they capture the average effect of countless interactions of particles and waves in complex systems, requiring sophisticated physics and intensive numerical computation.

These calculations are essential for understanding how charged particles behave in Earth’s radiation belts, yet until now they required specialist, hard-to-access software. This open-source PIRAN code gives the international space science community, for the first time, a fully transparent and accessible Python-based tool for calculating relativistic diffusion coefficients using modern methods.

Dr Oliver Allanson - University of Birmingham

Different research groups have created their own complex computer codes, but these are often difficult to use or unavailable beyond that specific research group.

Working with counterparts at Los Alamos National Laboratory, USA, the University of Exeter, and Northumbria University, the scientists have created PIRAN (Particles In ResonANce) - a free, open-source, Python-based programme that anyone can use.

Accessible open-source code

PIRAN makes these detailed calculations easier to perform, and accessible to the broader scientific community. It is designed so other scientists can expand it - adding new wave types, additional particle species, or new physics. This is first time code like this has been fully accessible.

Lead author Dr Oliver Allanson, from the University of Birmingham, said: “These calculations are essential for understanding how charged particles behave in Earth’s radiation belts, yet until now they required specialist, hard-to-access software. This open-source PIRAN code gives the international space science community, for the first time, a fully transparent and accessible Python-based tool for calculating relativistic diffusion coefficients using modern methods.

“By making these capabilities openly available in Python, PIRAN removes a major barrier for researchers and enables wider, more collaborative development of future space weather models.”

The software produces results that match those from classic, trusted scientific codes. PIRAN is the first fully open-source code that includes both major calculation methods. Entirely written in Python, the code is easy to read and modify – allowing it to be expanded and improved by the community.

At present the code supports fully tested calculations for electron diffusion coefficients based on whistler-mode waves in a fully ionized proton-electron cold plasma. Future developments could include other wave modes and other plasma compositions - enabling improved radiation-belt modelling, space-weather prediction, and comparative magnetospheric studies across planetary systems.

Notes for editors

For more information, please contact the  press office on +44 (0) 121 414 2772.

‘Diffusion Coefficients for Resonant Relativistic Wave‐Particle Interactions Using the PIRAN Code’ - Oliver Allanson et al is published in Earth and Space Science.

As well as being ranked among the world’s top 100 institutions, the University of Birmingham is the most targeted UK university by top graduate employers. Its work brings people from across the world to Birmingham, including researchers, educators and more than 40,000 students from over 150 countries.

Participating institutions: University of Birmingham; University of Exeter; Los Alamos National Laboratory; and Northumbria University.