Post processing
After the image has been pre-processed and now, with only one product in our hands (master light), it's time for the last stage.
The post processing stage consists of five essentials steps which are:
- Background extraction
- Color calibration
- Deconvolution
- Histogram stretch
- Starless image creation
- Star reduction
- Color editing
In this part, we'll showcase in detail each step (and those in between) the process which turns an almost unrecognizable image into a beautiful and accurate astrophotography.
Background extraction
When stacking hundreds of light frames into a master light image, we have to remember that every one of them was captured through different sky conditions. These conditions can be moonlight, light pollution, and non uniform sky brightness in overall. This means that 99% of the time, our master light will end with gradients, which are often difficult to remove. The goal with background extraction is to clean the image from all gradients to end up with the optimal foundation to continue the processing.
For background extraction/gradient correction we use GraXpert, a free to use program that takes Pixinsight's "DynamicBackgroundExtraction" to a more intuitive interface, that sometimes produces even better results.
The first step into GraXpert is to obviously, import the image. One great thing about GraXpert is that it can open .xisf files, which retain all the astrometric data that's after used to color calibrate the image. Then, we click on "Create grid".
This will place numerous background samples across the image that will be used to determine the brightness of it in each sample area. Often times, we have to adjust the "Grid tolerance" parameter, depending of the type of target. For instance, on nebulas we tend to use smaller tolerance values because it's more likely that the background will be dominated by faint nebulosity, which doesn't make for background itself. On the other hand, higher tolerance values are used in galaxies as the background will often be pitch black, with the exception of having the presence of IFN or other type of background object.
With all the samples placed, we proceed with "Calculate background". This will create a synthetic background model that'll be used to subtract the background, and that's it.
Be sure to export the image as a .xisf file, as we're switching back to Pixinsight.
Color calibration
The next stage involves using Pixinsight and it's SpectroPhotometricColorCalibration module. The objective when calibrating the colors, it as the name itself says: to equal the color channel levels.
In the case of a color image sensor, and due to the bayer matrix filter, usually the color that will dominate the image will be green. That's because of the RGGB pattern that the vast majority of color sensors feature, making green (G) double as prominent than red (R) and blue (B).
Apart of equalizing the color channels, Pixinsight's SpectroPhotometricColorCalibration can use the astrometric solution present in the .xisf file to assign each star it's true color. More about SPCC here.
So, after importing back the image from GraXpert, we open the SPCC module and with the preview function (Alt+N) we select a background area to assign to the "Region of Interest" section, below the "Background Neutralization". Then we click on "From Preview", and select the created background preview. This will give the module an idea of how bright the background is to further balance the image color wise.
In case of a narrowband image, it is important to check the "Narrowband filters mode" and write on each channel the bandwidth admitted by each filter. In the case of ours, we fill those fields with 7nm each as we use the L-eXtreme filter by Optolong that allows 7 nanometers of light to pass through.
In the case of a broadband color image, we simply leave all as it is when starting the process, except from the background preview described earlier.
With all of that, we can apply the process and our image will be correctly color calibrated. It is important to now STF auto stretch with all the channels linked, as the color balance is correct now.
Deconvolution
Time for the most feared process in Pixinsight: deconvolution.
But first, let us explain what deconvolution is. Deconvolution is the process of restoring an image whose light passed through the atmosphere essentially blurring it due to diffraction. Although, it is still considered sharpening, it's quite a different process as it utilizes the "point spread function" (PSF) to undo the effects of the atmosphere.
Now, here comes the part that would explain every single step to deconvolution, but the truth is that we no longer do it manually. Instead, we use the BlurXTerminator module made by Russell Croman, that works with AI to deliver the best deconvolution possible. But even this semi automated process requires some steps before it.
First, with the preview function we select a central area of the image, where the stars will be the most accurate in terms of how the atmosphere affected the image, and because it's the area where the least optical aberrations will be visible, such as backfocus and coma that are typically accentuated at the corners. Then, we go to Script -> Render -> PSFImage. Note that this script is only available as a separate download from Hartmut Bornemann's repository. With the preview selected and the script ready, we click on "Evaluate" and wait to the stars to be analyzed. After that and with the synthetic PSF image created, we'll focus on two values: FWHMx and FWHMy. With those values, we can calculate the mid point between the two and with that, we can give BlurXTerminator the most accurate way of applying the process.
Later, in BlurXTerminator we uncheck the "Automatic PSF" box and check the "Correct First" one. Then, we fill the "PSF Diameter" with the resulting value of the "PSFImage" that we calculated earlier and with that, apply the process.
Histogram stretch
Once deconvolution is done, it is time to stretch the image. See, when opening an integrated master light image for the first time in Pixinsight, you will see that is completely black apart of the brightest stars. That's because we're still in the linear stage, which means all the data captured is still in the lower (shadows) portion of the histogram.
This is not a problem in the beginning, because some earlier processes like background extraction, color calibration and deconvolution require to be applied in the linear stage. But past that, we need to bring those shadows up to the midtones areas, so that when we save our image, it won't appear dark. This is called stretching, as we are "stretching" the histogram graph.
For this step, we use Dark Archon's EZ Processing Suite, as it offers an easy and efficient way to stretch our image. It is as simple as going to Script -> EZ Processing Suite -> EZ Soft Stretch. Default values will work very well most of the times, so the only step is to click on the "Run EZ Soft Stretch" button and you'll now have a non-linear image.
Star reduction
After stretching and with the image now in a non-linear stage, we can continue with the star reduction step. This, in theory is not a mandatory step because it depends on if the image really need the stars to be reduced (for instance, we don't necessarily need to reduce stars on star cluster images), but most of the time, the results will be beneficial.
For this though, we need to subtract the stars to create a "starless" image. This step is required by the star reduction script that we're going to use. For star removal, we typically use the StarXTerminator process (developed once again by Russell Croman). After removing the stars, you can optionally work with the starless image on adjusting the contrast and levels.
Once you are done with the editing on the starless image, it's time for merging the stars back in. For this, we'll use a simple formula in the PixelMath process.
The formula as it follows is "starless + star_mask".
For the star reduction itself, we always use Bill Blanshan's star reduction PixelMath scripts. They work very well on all it's presets and It's up to the user taste on which to apply. Note that this script is dependent on the starless image generated earlier to work.
Color editing
For the final step, we will move to Adobe Photoshop. Here, we'll open the image as a 16 bits TIFF (it needs to be outputted as that from Pixinsight) and begin to apply some curve adjustments. If you have a fairly recent version of PS, we recommend that you use the CameraRAW module, as it has multiple color editing options, including a selective color tool (color mixer). The goal with this step is to tweak color hues, increase or lower saturation and each color luminance. This section is an image enhancing step that depends only on the user's taste.
The final step to all postprocessing is to export as a .jpeg and it'll be ready to share!
Post-procesado
Luego de que la imagen haya sido pre-procesada y ahora, con un solo producto en nuestras manos (master light), es el momento de la última etapa.
La etapa de post-procesado consta de cinco pasos esenciales, los cuales son:
- Corrección del fondo
- Calibración de color
- Deconvolución
- Estirado de histograma
- Creación de imagen "starless"
- Reducción de estrellas
- Corrección de color
En esta parte, mostraremos en detalle cada paso (y los intermedios) del proceso que convierte una imagen casi irreconocible en una astrofotografía.
Extracción de fondo
Al apilar cientos de light frames en una imagen master light, debemos recordar que cada uno de ellos fue capturado bajo diferentes condiciones de cielo. Estas condiciones pueden ser luz de luna, contaminación lumínica y brillo del cielo no uniforme proveniente de otras fuentes. Esto significa que el 99% de las veces, nuestro master light terminará con gradientes, que a menudo son difíciles de eliminar. El objetivo de la corrección de fondo es limpiar la imagen de todos los gradientes para terminar con la base óptima para continuar el procesado.
Para la extracción de fondo/corrección de gradientes utilizamos GraXpert, un software gratuito que lleva el "DynamicBackgroundExtraction" de Pixinsight a una interfaz más intuitiva y automatizada.
El primer paso en GraXpert es, obviamente, importar la imagen. Una gran ventaja de GraXpert es que puede abrir archivos .xisf, los cuales retienen todos los datos astrométricos que luego se utilizan para calibrar el color de la imagen. Continuamos clickeando en "Create grid".
Esto colocará numerosas muestras de fondo a través de la imagen que se usarán para determinar el brillo de la misma en cada área de muestra. A menudo, tenemos que ajustar el parámetro de "Grid tolerance", dependiendo del tipo de objetivo. Por ejemplo, en nebulosas tendemos a usar valores de tolerancia más pequeños porque es más probable que el fondo esté dominado por nebulosidad tenue, que no constituye el fondo en sí. Por otro lado, se usan valores de tolerancia más altos en galaxias ya que el fondo a menudo será completamente negro, con la excepción de tener la presencia de IFN u otro tipo de objeto de fondo.
Con todas las muestras colocadas, procedemos con "Calculate background". Esto creará un modelo de fondo sintético que se usará para restar el fondo.
Una vez aplicada la corrección, asegúrate de exportar la imagen como un archivo .xisf, ya que volveremos a Pixinsight.
Calibración de color
La siguiente etapa implica usar Pixinsight y su módulo SpectroPhotometricColorCalibration. El objetivo al calibrar los colores es, como su propio nombre indica: igualar los niveles de los canales de color.
En el caso de un sensor de imagen a color, y debido su filtro de Bayer, usualmente el color que dominará la imagen será el verde. Esto se debe al patrón RGGB que presenta la gran mayoría de los sensores de color, haciendo que el verde (G) sea el doble de prominente que el rojo (R) y el azul (B).
Además de ecualizar los canales de color, el SpectroPhotometricColorCalibration de Pixinsight puede usar la solución astrométrica presente en el archivo .xisf para asignar a cada estrella su color verdadero. Más sobre SPCC aquí.
Así que, después de importar de vuelta la imagen desde GraXpert, abrimos el módulo SPCC y con la función de vista previa (Alt+N) seleccionamos un área de fondo para asignar a la sección "Region of Interest", debajo de "Background Neutralization". Luego hacemos click en "From Preview" y seleccionamos la vista previa de fondo creada. Esto le dará al módulo una idea de cuán brillante es el fondo para equilibrar aún más la imagen en cuanto a color.
En caso de una imagen de banda estrecha (narrowband), es importante marcar la casilla "Narrowband filters mode" y escribir en cada canal el ancho de banda admitido por cada filtro. En nuestro caso, rellenamos esos campos con 7nm cada uno ya que en este caso, utilizamos el filtro L-eXtreme de Optolong que permite el paso de 7 nanómetros de luz.
En el caso de una imagen en color de banda ancha (broadband), simplemente dejamos todo tal como está al iniciar el proceso, a excepción de la vista previa de fondo descrita anteriormente.
Con todo eso, podemos aplicar el proceso y nuestra imagen estará correctamente calibrada en color. Es importante realizar ahora un STF Auto Stretch con todos los canales vinculados (ícono de la cadena), ya que el balance de color ahora es correcto.
Deconvolución
Es hora del proceso más temido en Pixinsight: la deconvolución.
Pero primero, pongamos en la mesa el concepto de la deconvolución. La deconvolución es el proceso de restaurar una imagen cuya luz pasó a través de la atmósfera, desenfocándola esencialmente debido a la difracción. Aunque se considera un proceso de sharpening, es un proceso bastante diferente ya que utiliza el "point spread function" (PSF) para perfilar la atmósfera mediante una estrella sintética.
Si bien, Pixinsight cuenta con un proceso dedicado para la deconvolución, en su lugar, utilizamos el módulo BlurXTerminator hecho por Russell Croman, que funciona con IA para automatizar esta etapa y ofrecer los mejores resultados. Pero incluso este proceso semi-automatizado requiere algunos pasos previos.
Primero, con vista previa seleccionamos un área central de la imagen, donde las estrellas serán las más precisas en términos de cómo la atmósfera afectó la imagen, y porque es el área donde menos aberraciones ópticas serán visibles, tales como el backfocus y la coma que típicamente se acentúan en las esquinas. Luego, vamos a Script -> Render -> PSFImage. Ten en cuenta que este script solo está disponible como una descarga separada desde el repositorio de Hartmut Bornemann. Con la vista previa seleccionada y el script listo, hacemos clic en "Evaluate" y esperamos a que las estrellas sean analizadas. Después de eso y con la imagen PSF sintética creada, nos enfocaremos en dos valores: FWHMx y FWHMy. Con esos valores, podemos calcular el punto medio entre los dos y con eso, podemos darle a BlurXTerminator la manera más precisa de aplicar el proceso.
Luego, en BlurXTerminator desmarcamos "Automatic PSF" y marcamos "Correct First". Entonces, rellenamos el "PSF Diameter" con el valor resultante de la "PSFImage" que calculamos anteriormente y con eso, aplicamos el proceso.
Estirado de histograma
Una vez realizada la deconvolución, es momento de estirar la imagen. Verás, al abrir una imagen master light integrada por primera vez en Pixinsight, notarás que es completamente negra a excepción de las estrellas más brillantes. Eso es porque todavía estamos en la etapa lineal, lo que significa que todos los datos capturados todavía se encuentran en la porción inferior (sombras) del histograma.
Esto no es un problema al principio, porque algunos procesos anteriores como la extracción de fondo, calibración de color y deconvolución requieren ser aplicados en la etapa lineal. Pero después de eso, necesitamos llevar esas sombras hacia las áreas de tonos medios, para que cuando guardemos nuestra imagen, no se vea oscura. A esto se le llama estirado (stretching), ya que estamos "estirando" la gráfica del histograma.
Para este paso, usamos EZ Processing Suite de Dark Archon, ya que ofrece una forma fácil y eficiente de estirar nuestra imagen. Es tan simple como ir a Script -> EZ Processing Suite -> EZ Soft Stretch. Los valores predeterminados funcionarán muy bien la mayoría de las veces, por lo que el único paso es hacer clic en el botón "Run EZ Soft Stretch" y ahora tendrás una imagen no lineal.
Reducción de estrellas
Después del estirado y con la imagen ahora en una etapa no lineal, podemos continuar con el paso de reducción de estrellas. Este, en teoría, no es un paso obligatorio porque depende de si la imagen realmente necesita que las estrellas se reduzcan (por ejemplo, no necesitamos necesariamente reducir estrellas en imágenes de cúmulos estelares, ya que las protagonistas son las estrellas), pero la mayoría de las veces, los resultados serán beneficiosos.
Sin embargo, para esto necesitamos restar las estrellas para crear una imagen "starless" (sin estrellas). Este paso es requerido por el script de reducción de estrellas que vamos a usar. Para la remoción de estrellas, típicamente usamos el proceso StarXTerminator (desarrollado una vez más por Russell Croman). Después de remover las estrellas, puedes opcionalmente trabajar con la imagen sin estrellas ajustando el contraste y los niveles.
Una vez que hayas terminado con la edición en la imagen sin estrellas, es el momento de fusionar las estrellas de vuelta. Para esto, usaremos una fórmula sencilla en el proceso PixelMath.
La fórmula, como sigue, es "starless + star_mask".
Para la reducción de estrellas en sí, siempre usamos los scripts de PixelMath para reducción de estrellas de Bill Blanshan. Funcionan muy bien en todos sus preajustes y depende del gusto del usuario cuál aplicar. Ten en cuenta que este script depende de la imagen sin estrellas generada anteriormente para funcionar.
Edición de color
Para el paso final, nos moveremos a Adobe Photoshop. Aquí, abriremos la imagen como un TIFF de 16 bits (necesita ser exportada así desde Pixinsight) y comenzaremos a aplicar algunos ajustes de curvas. Si tienes una versión bastante reciente de PS, es recomendable utilizar el módulo CameraRAW, ya que tiene múltiples opciones de edición de color, incluyendo una herramienta de color selectivo (mezclador de color). El objetivo con este paso es ajustar los matices de color, aumentar o reducir la saturación y la luminancia de cada color. Esta sección es un paso de mejora de imagen que depende únicamente del gusto del usuario.
El paso final para todo el post-procesado es exportar como un .jpeg, y estará lista para compartir!

