MHSXtraPy: a Python code for the extrapolation of magnetohydrostatic fields on the Sun using analytical solutions

L. Nadol*, T. Neukirch

*Corresponding author for this work

Research output: Contribution to journalArticlepeer-review

Abstract

We present a Python code for calculating and displaying magnetic field extrapolations from given 2D boundary conditions, specifically from solar surface magnetograms. The code implements analytical magnetohydrostatic models that incorporate the transition from non-force-free to force-free magnetic fields in the solar atmosphere. It allows for different parametrizations of this transition and includes functions to compute magnetic fields, plasma pressure, and density. Fast Fourier methods ensure efficient computation, and the output includes 3D visualizations of field lines and plasma structures. The implementation is optimized for accessibility and speed, making it suitable for both research and educational purposes. The only prerequisite for running the code is a Python compiler. All source code, examples, input files, solutions, and instructions are available for download from GitHub.
Original languageEnglish
Article numberrzaf053
Number of pages9
JournalRAS Techniques and Instruments
Volume4
DOIs
Publication statusPublished - 28 Nov 2025

Keywords

  • Software
  • Numerical methods
  • Sun: MHS
  • Sun
  • Magnetic field
  • Sun: extrapolation

Fingerprint

Dive into the research topics of 'MHSXtraPy: a Python code for the extrapolation of magnetohydrostatic fields on the Sun using analytical solutions'. Together they form a unique fingerprint.

Cite this