torchmfbd: a flexible multi-object multi-frame blind deconvolution code
A. Asensio Ramos, C. Díaz Baso, C. Kuckein, S. Esteban Pozuelo, M. G. Löfdahl
TL;DR
Torchmfbd delivers a modern, open-source MOMFBD implementation built on PyTorch, enabling GPU-accelerated, flexible restoration of ground-based solar images with spatially variant PSFs. It combines MAP-based inference with wavefront-based and data-driven (NMF) PSF parameterizations, and incorporates both implicit and explicit regularization, destretching, and patch-based processing. The framework supports large fields of view and provides efficient optimization using downstream GPU acceleration, demonstrated across IMaX, CRISP, HiFI, and CHROMIS data, with competitive image quality and reduced computation time. The code is designed to be extensible, allowing new reconstruction and regularization methods to be added, with future work including linear equality constraints and proximal projection approaches to handle more complex acquisition schemes.
Abstract
Post-facto image restoration techniques are essential for improving the quality of ground-based astronomical observations, which are affected by atmospheric turbulence. Multi-object multi-frame blind deconvolution (MOMFBD) methods are widely used in solar physics to achieve diffraction-limited imaging. We present torchmfbd, a new open-source code for MOMFBD that leverages the PyTorch library to provide a flexible, GPU-accelerated framework for image restoration. The code is designed to handle spatially variant point spread functions (PSFs) and includes advanced regularization techniques. The code implements the MOMFBD method using a maximum a-posteriori estimation framework. It supports both wavefront-based and data-driven PSF parameterizations, including a novel experimental approach using non-negative matrix factorization. Regularization techniques, such as smoothness and sparsity constraints, can be incorporated to stabilize the solution. The code also supports dividing large fields of view into patches and includes tools for apodization and destretching. The code architecture is designed to become a flexible platform over which new reconstruction and regularization methods can also be implemented straightforwardly. We demonstrate the capabilities of torchmfbd on real solar observations, showing its ability to produce high-quality reconstructions efficiently. The GPU acceleration significantly reduces computation time, making the code suitable for large datasets. The code is publicly available at https://github.com/aasensio/torchmfbd.
