SoftwareX (Feb 2025)
TAMAG: A python library for Transformation and Augmentation of solar Magnetograms
Abstract
Solar line-of-sight (LoS) magnetograms consist of two-dimensional representations of magnetic field strength of Sun’s photosphere, typically ranging from (∼±4500 Gauss). However, directly employing these original high-depth rasters with 32-bit floating-point precision in predictive modeling tasks can be computationally inefficient due to their large size. This can result in deficient patterns, often caused by missing raster values due to instrumental errors. Furthermore, this data is primarily used for data-driven solar physics research and space weather forecasting, where one of the most prominent challenges is class imbalance and data scarcity. Due to the scarcity of such data, predictive models may suffer from reduced generalizability, potentially impacting the reliability of forecasts. This paper introduces an open-source Python library named “TAMAG”, motivated by the need to address these challenges. TAMAG streamlines the preprocessing of solar magnetograms by offering appropriate transformations and domain-appropriate augmentations to generate new data that closely matches the distribution of the original data. It generates the output as 8-bit (grayscale) or 24-bit (RGB) images, as well as 2D arrays as specified by the user. TAMAG aims to benefit researchers by improving efficiency, usability, and integration of various appropriate data augmentation methodologies into existing workflows, ultimately enhancing research outcomes, analysis, and data-driven solutions in solar physics and space weather forecasting.
Keywords