A Robust and Simple Method for Filling in Masked Data in Astronomical Images
Open Access
- 1 March 2024
- journal article
- research article
- Published by IOP Publishing in Publications of the Astronomical Society of the Pacific
- Vol. 136 (3) , 034503
Abstract
Astronomical images often have regions with missing or unwanted information, such as bad pixels, bad columns, cosmic rays, masked objects, or residuals from imperfect model subtractions. In certain situations it can be essential, or preferable, to fill in these regions. Most existing methods use low order interpolations for this task. In this paper a method is described that uses the full information that is contained in the pixels just outside masked regions. These edge pixels are extrapolated inwards, using iterative median filtering. This leads to a smoothly varying spatial resolution within the filled-in regions, and ensures seamless transitions between masked pixels and good pixels. Gaps in continuous, narrow features can be reconstructed with high fidelity, even if they are large. The method is implemented in maskfill, an open-source MIT licensed Python package (https://github.com/dokkum/maskfill). Its performance is illustrated with several examples, and compared to several alternative interpolation schemes.Keywords
All Related Versions
This publication has 31 references indexed in Scilit:
- Deep Image PriorInternational Journal of Computer Vision, 2020
- SciPy 1.0: fundamental algorithms for scientific computing in PythonNature Methods, 2020
- Bad Pixel Modified Interpolation for Astronomical ImagesPublications of the Astronomical Society of the Pacific, 2013
- Angular Differential Imaging: A Powerful High‐Contrast Imaging TechniqueThe Astrophysical Journal, 2006
- The H$\mathsf{\alpha}$ galaxy surveyAstronomy & Astrophysics, 2004
- Optimal Techniques in Two‐dimensional Spectroscopy: Background Subtraction for the 21st CenturyPublications of the Astronomical Society of the Pacific, 2003
- Detailed Structural Decomposition of Galaxy ImagesThe Astronomical Journal, 2002
- Drizzle: A Method for the Linear Reconstruction of Undersampled ImagesPublications of the Astronomical Society of the Pacific, 2002
- Cosmic‐Ray Rejection by Laplacian Edge DetectionPublications of the Astronomical Society of the Pacific, 2001
- The cosmic ray background in charge coupled devicesPublications of the Astronomical Society of the Pacific, 1979