arXiv · 2511.07538
MHSXtraPy -- A Python code for the extrapolation of magnetohydrostatic fields on the Sun using analytical solutions
Abstract
We present a Python code for calculating and displaying magnetic field extrapolations from given two-dimensional 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 parameterisations of this transition and includes functions to compute magnetic fields, plasma pressure, and density. Fast Fourier methods ensure efficient computation, and the output includes three-dimensional visualisations of field lines and plasma structures. The implementation is optimised 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.
Explore related subjects
Keep this discovery
Lilli Nadol, Thomas Neukirch. 2025-11-10. MHSXtraPy -- A Python code for the extrapolation of magnetohydrostatic fields on the Sun using analytical solutions. https://arxiv.org/abs/2511.07538
Cite the original work for its findings. Save a collection to share your selection of sources.