Saturday, May 18, 2024

The General Nature of Astronomical Images...

 Astronomical images are acquired basically the same as 'everyday' images. While the hardware may be optimised for the special characteristics of an astronomical image, the capture process remains one of capturing photons and turning their energy into a chemical change (in the case of film - rare these days) or, more commonly, an electrical signal via a digital sensor chip. The digital capture device consists of a lens of a certain aperture and focal length coupled with a sensor. While the technology for capturing 'everyday' images and astronomical images is largely the same, there is a significant difference in the nature of the subject being observed.

For 'everyday' images, in the vast majority of cases, there is no lack of photons impinging on the sensor across the whole image. A typical 'everyday image is shown below.

An 'Everyday' Image
The brightness of this image data across the image can be represented by a luminance histogram as shown below.

Everyday Image Luminance Histogram
This histogram plots the count (vertical axis) of pixels in the image which have a certain luminance value (horizontal axis: dark to light - left to right). There are three peaks - the left-most peak near 0 luminance are the 'black pixels', while the right-most peak near maximum brightness are the bright spots in the image. The bulk of the pixels have luminances in-between these two extremes. There is a broad third peak near the 20% luminance point. While there are peaks and troughs in this histogram it could be said, generally speaking, that the pixels are reasonably spread across the luminance range - as you would expect from inspection of the image above.

In contrast, note the image below - which is a Seestar S50 output image of the Orion Nebula. This is one of the brightest nebulae - and yet only the brightest part is visible along with some bright stars.

Unprocessed Seestar S50 Output Image of the Orion nebula (M42)
The brightness of this astronomical image can plotted with an histogram again as shown below.
Example Astronomical Image Luminance Histogram
In this histogram there is just one visible peak - right near the lowest luminance. The bright parts of the nebula and the bright stars are to the right - but are not visible in the histogram as almost all the pixels are grouped into producing the very large spike near zero luminance. This is the problem with astronomical images in general. The image display requires the bright stars to be not saturated whilst the fainter details (nebulosity and faint stars) need to be promoted up the brightness scale so as to become visible.

A simple linear addition/multiplication of the brightness is not possible as this would saturate the bright parts. Some sort of non-linear transformation needs to be done - where the fainter details are brightened - but the brighter parts are not saturated. An addition issue is that the faint details that are to be brightened natively lie at the very bottom of the luminance scale. This area is also populated with system noise. The shorter the exposure for a given optics, the closer to the system noise the desired faint details will be. It becomes a challenge to distinguish which part of the pixel value is due to noise and which part is real 'signal'.

The successful extraction of the fainter details of the image is a fine balance between promoting those faint details without promoting the system noise into view. In practice - unless it is acceptable to lose detail in the data - some level of noise will be left in the image. How much is acceptable is a subjective judgement.

The Orion Nebula image can be 'stretched' as shown below. Here can be seen the brighter parts (with little noise) along with the fainter parts descending down to the 'salt-and-pepper' system noise level.
Example Astronomical Image - Stretched Non-Linearly
The corresponding luminance histogram is shown below...
Luminance Histogram of Stretched Example Astronomical Image
Note that this histogram looks similar to the 'everyday' image above - ignoring the peaks at minimum and maximum luminance. The bulk of the pixels now have a luminance of around 25% of full scale. Note also that the detail in the bright centre of the nebula has been washed out due to compression at the top end of the brightness scale. A different allocation of the limited dynamic brightness range can restore the detail in the bright area to some extent - but at the cost of some loss in detail in the faint nebulosity areas. Getting that balance right is a challenge.