Deconvolution in Astronomy: From Hubble to BlurXTerminator, the Art of Correcting Blur

Galaxie spirale photographiée par le télescope spatial Hubble (NASA/ESA) - illustration de l'imagerie astronomique résolue par déconvolution

When Hubble was launched into orbit in 1990, its first images were blurry. This was not due to a handling error, but to a flaw in the polishing of the primary mirror: a spherical aberration of 2 micrometers. The mirror was 2 micrometers too flat at its edges, and the light did not converge at a single point. The images were unusable for scientific purposes.

NASA solved the problem in 1993 with a repair mission that installed an optical corrector (COSTAR). But between 1990 and 1993, astronomers used another method to recover usable images: deconvolution. A mathematical algorithm that, using a blurry image and knowledge of the optical defect, reconstructs a sharp image. This is how the use of deconvolution in astronomy came about—not as a tool for image enhancement, but as a tool for scientific correction.

Today, deconvolution is accessible to all astrophotographers. And with tools like RC Astro’s BlurXTerminator, which uses machine learning, it’s becoming a standard part of the post-processing workflow. But be careful: this isn’t cheating—it should be used sparingly.

The Origin: Hubble and the Richardson-Lucy Algorithm

Hubble’s defect was precisely known. The opticians had measured the exact spherical aberration of the primary mirror. Knowing the defect, they were able to model the point spread function (PSF)—the exact shape that an ideal point of light would take after passing through Hubble’s defective optics.

The PSF is the key to everything. Every astronomical image is the result of a convolution between the actual scene and the optical system’s PSF. Convolution causes blurring: it spreads each point of light into a spot. If we know the PSF, we can mathematically reverse the convolution—this is called deconvolution.

The algorithm used for Hubble is called the Richardson-Lucy algorithm, named after William Richardson (1972) and Leon Lucy (1974), who developed it independently. It is an iterative algorithm: it starts with an estimate of the sharp image, convolves it with the PSF, compares the result with the actual blurry image, and makes corrections. It repeats this process until the reconstructed image converges toward the actual image.

The Technical Section: Equations

Deconvolution is based on an equation that appears simple at first glance. An observed image d is the result of the convolution of the actual image u with the PSF P, plus noise:

d = u ⊗ P + noise

where ⊗ denotes convolution. The goal of deconvolution is to recover u from d and a known P.

The Richardson-Lucy algorithm is an iterative procedure that solves this problem using maximum likelihood, assuming that the noise follows a Poisson distribution (which is the case for photon detection in astronomy). At each iteration t, the estimate u of the true image is updated according to:

û(t+1) = û(t) · [ (d / (û(t) ⊗ P)) ⊗ P* ]

where:

  • û(t) is the image estimate at iteration t
  • d is the observed (blurred) image
  • P is the PSF of the system
  • P* is the inverted PSF (the mirror image of the PSF)
  • · is element-by-element multiplication
  • ⊗ is the 2D convolution

The term (d / (û(t) ⊗ P)) compares the observed image to the reconstructed blurred image. If the estimate is correct, this ratio equals 1 everywhere, and the image remains unchanged. If there is a discrepancy, the estimate is corrected in the direction that increases the likelihood.

The algorithm converges to the maximum likelihood solution for a Poisson distribution, which corresponds well to photon noise in astronomical imaging. However, the problem is said to be «ill-posed»: for a given blurry image, several different sharp images can produce the same blurry image after convolution. Deconvolution must therefore «guess» the correct solution, and the quality of the result depends on the quality of the PSF and the noise level.

The number of iterations is a trade-off: if there are too few, the image remains blurry; if there are too many, noise is amplified and artifacts appear (dark halos around stars, fictitious structures in the background).

From Hubble to Amateurs: Deconvolution in PixInsight

Deconvolution has long been the domain of professionals. It required knowing the PSF precisely, extracting the stars from the image, modeling their profiles, and iterating manually. In PixInsight, the Deconvolution process allows you to do this, but it is notoriously difficult to fine-tune. You have to create a support mask to protect the sky background, choose a number of iterations, and hope you don’t create artifacts.

When done right, the result is spectacular: the stars appear as sharp, distinct points, and the fine details of nebulae and galaxies stand out. But it requires a great deal of time and expertise.

BlurXTerminator: Deconvolution Using Machine Learning

BlurXTerminator, developed by Russell Croman at RC Astro, is a game-changer. It is a machine learning-based deconvolution tool designed specifically for astronomical images taken with amateur equipment.

The principle differs from classical deconvolution. Instead of manually modeling the PSF and iterating, BlurXTerminator uses a neural network trained on thousands of astronomical images. The network has learned to recognize the blur patterns produced by different types of optics, seeing conditions, and guiding errors, and to correct them.

How It Works

The BlurXTerminator neural network was trained as follows: Starting with sharp images (ground truth), we convolve them with various PSFs representative of amateur equipment (seeing, guiding, coma, aberrations), and then present the blurry-sharp image pairs to the network. The network learns to generate the sharp image from the blurry image. This is supervised learning using a loss function that measures the difference between the prediction and the ground truth.

There is a significant difference from classical deconvolution:

  1. Local, non-stationary PSF : Conventional deconvolution assumes a uniform PSF across the entire image. BlurXTerminator analyzes the image in 512×512-pixel tiles and determines the PSF locally based on the stars present in each tile. This corrects for PSF variations caused by coma, field curvature, and corner aberrations.
  1. No manual iteration : The network produces a result in a single pass. No need to set the number of iterations, no support mask, no ringing.
  1. Aberration correction : BlurXTerminator corrects optical aberrations that conventional deconvolution does not address: first- and second-order coma, astigmatism, trefoil, defocus, longitudinal and lateral chromatic aberration, and guide star blur.
  1. Separation of Stars and Non-Stars : The tool allows you to reduce the diameter of stars and sharpen non-stellar structures (nebulae, galaxies) independently. This prevents ringing (dark halos) that occurs with conventional deconvolution when pushed too far.

Is that cheating?

No, but only if you use it sparingly. Russell Croman says so himself in his technical manual: deconvolution is an «ill-posed» problem. For a given blurry image, several sharp images can produce the same blurry image after convolution. The tool must therefore make an informed «guess.».

BlurXTerminator is designed not to invent details. Its loss function is an image reconstruction function, not a perception function (SSIM). This means that the network is trained to produce the image that actually corresponds to the information present in the blurry image, not the image that «looks» the sharpest. The difference is subtle but important: a perceptual function could invent structures that do not exist to make the image look «nicer.» A reconstruction function simply retrieves the information that is actually present.

But there is a risk. If the parameters are pushed to their maximum, the tool can amplify noise and create spurious structures in areas of weak signal. Typical artifacts include halos around saturated stars, spurious structures in the faint sky background, and stars that appear too «hard» (excessive reduction of the stellar halo).

The rule: Use BlurXTerminator as a tool for recovering information, not as a tool for creating information. The network can only recover what is already present in the image, in the form of low contrast. If the information isn’t there (insufficient signal-to-noise ratio), no deconvolution can correctly reconstruct it.

How to Use It Sparingly

Before BlurXTerminator

  1. Sampling Properly : Deconvolution only works if the image is oversampled. The FWHM of the stars must be at least 4 pixels. If it’s less than 2–3 pixels, the image is undersampled, and deconvolution has nothing to recover. 2x drizzle can help if the image is undersampled.
  1. Good signal-to-noise ratio : Deconvolution amplifies noise. The noisier the image, the less effective the deconvolution will be. Stack enough exposures to ensure a clean sky background before deconvolving.
  1. Deconvolve before adding sound effects : Apply deconvolution before noise reduction. Deconvolution and noise reduction work against each other: the former amplifies noise, while the latter smooths it out. The standard order is: deconvolution, followed by noise reduction.

With BlurXTerminator

  1. "Correct Only" first : First, use "Correct Only" mode to correct aberrations (coma, guiding) without sharpening. This smooths out the stars and corrects optical defects.
  1. Next, moderate sharpening : Apply a second pass using a Nonstellar Sharpen filter with a value of 50–70 %, not 100 %. At 100 %, the tool attempts to reduce the PSF to zero—the theoretical maximum—which can create artifacts in low-signal areas.
  1. Watching the Stars : If dark halos appear around the stars, reduce the "Sharpen Stars" setting or increase the "Adjust Star Halos" setting. Dark halos are a sign that the deconvolution is too aggressive.
  1. Compare with and without : Keep a non-deconvolved version and compare the two. Deconvolution should reveal details that exist, not create them. If you see structures that do not appear in the raw image, they are either real (deconvolution has revealed them) or they are artifacts (deconvolution has invented them). When in doubt, check the raw image.
  1. Not everything : Do not deconvolve the sky background. BlurXTerminator automatically separates the stars from the non-stellar background, but the faint sky background may be affected. A sky protection mask may be helpful.

Limitations

Deconvolution isn't magic. Three important limitations.

First, it does not create information. If the PSF has smeared a detail to the point where it is indistinguishable from noise, no deconvolution can recover it. The Rayleigh criterion defines the resolution limit of a telescope (λ/D); below this limit, the information no longer exists in the image.

Next, it amplifies the noise. The deconvolution process «concentrates» the information, but it also concentrates the noise. A sky background that is already noisy can become grainy after deconvolution. That is why noise reduction must follow deconvolution, not precede it.

Finally, it assumes a known PSF. In classical deconvolution, the PSF must be extracted from the stars in the image. If the image contains no stars (a dense planetary field, or a deep-sky image with no reference stars), the PSF is unknown, and the deconvolution is blind (blind deconvolution), which is much less reliable. BlurXTerminator circumvents this problem by inferring the PSF from non-stellar structures when stars are absent, though with reduced accuracy.

In a nutshell

Deconvolution was developed to salvage blurry Hubble images; it is corrected using the Richardson-Lucy algorithm, which reconstructs the actual image from the blurry image and the known PSF. The equation is simple: the observed image is the convolution of the actual image with the PSF, and deconvolution reverses this operation. The algorithm iterates by comparing the reconstructed image to the observed image and making corrections.

Today, BlurXTerminator makes deconvolution accessible to amateurs by replacing manual iteration with a neural network trained on astronomical images. This isn’t cheating—it’s information recovery, provided it’s used sparingly. The rules: sample well (FWHM of 4+ pixels), ensure a good signal-to-noise ratio, use “Correct Only” first, apply moderate sharpening (50–70 %), watch for artifacts, and compare with the raw image.

Sources : NASA – The Hubble Mirror Defect ; Wikipedia – Richardson-Lucy Algorithm (Richardson 1972, Lucy 1974); ; RC Astro – BlurXTerminator Technical Manual ; STScI – HST Image Restoration.

See also on Deep Space Astronomy: Barlow and backfocus

Signature: CBurkhalter

Subscribe to our newsletter

By subscribing, you agree to our Privacy Policy.
Share

Tips for Getting the Most Out of Your Telescope

Get comprehensive, free training by signing up for the newsletter.

Newsletter
[category_menu_mobile]