Basic Processing Tutorial using PixInsight

Beginner Tutorial PixInsight

(This tutorial is also available as PDF in English and German here.)

So you just captured some images and are excited to start editing. But no matter what you try in Photoshop, the image just does not look as mind blowing as you hoped.
In my opinion, the biggest improvement anyone can make to one's images, is to start learning how to use a dedicated astro editing Software like PixInsight.
It is such a powerful tool with endless possibilities. It may seem expensive at first, but why invest thousands of dollars into gear, only to cheap out at the Editing stage?

PixInsight may be very confusing and complex when starting out. There are so many processes and scripts to use, in addition to being able to install third party plugins as well.
Even I am still learning something new with every image I process.

Over the course of this rather short tutorial I'll walk you through a complete edit of an astro image from start to finish, including steps like calibrating, stacking, color balancing and stretching. 
This tutorial (which is also available as downloadable PDF at the bottom) contains screenshots and basic explanations on how to use processes, in order to get the best result possible, written in a way so that even a complete beginner can replicate the steps and finally learn how it works.

Table of contents:

  • Calibration
  • Stacking
  • LRGB-Combination
  • Background Extraction
  • Color Calibration
  • Deconvolution and Denoising
  • Removing and separately editing the stars
  • Stretching


Introductory remarks

 
PixInsight may be very confusing and difficult, especially for beginners. Here are a few helpful explanations. I'm using a Mac, so the layout or shortcuts may be a bit different than on Windows.
 
Workspace:
 

  • Processes are the functions or small programs in PixInsight that are used for editing.
  • At the top of the bar under Process <All Processes> you will find all processes.
  • Processes can also be searched via the Process Explorer on the left side and the search bar.

Processes have the following icons at the bottom of the window:

Part 1: Software

 

Required software:

  • PixInsight (45-day trial available)

       + Gaia DR3/SP Database (small set, available on the PixInsight website) 

       + GHS Script

  • StarXTerminator or StarNet2
  • GraXpert 

 

Optional (but highly recommended) software:

 

  • BlurXTerminator
  • NoiseXTerminator
  • Image editing software of your choice (Photoshop or similar)

 

Links: 

 

 

If you experience any problems/difficulties with the installation: There are a lot of very helpful videos and tutorials on the internet.

Part 2: Preparations

Please note that this step is just how I do it, there are many possibilities. It is in no way mandatory, but I'd recommend starting out like that.

2.1        Creating a Directory

Basically, a folder with all image files should be created. It should be divided into the different frames Lights, Darks, Bias and Flats (of course depending on the calibration frames used).

The overarching structure is up to you, but I recommend creating a folder for the images that will be discarded later, as you should almost never delete data permanently, as well as a folder for the stacking process called WBPP. Since we are copying all the lights that are used in 2.2, all the lights that are currently available should be placed in a separate folder, and not in the finished lights folder.

2.2        Sorting out faulty lights

Unfortunately, it can happen that one or even multiple lights contain errors, e.g. poor contrast due to passing clouds or blurred images due to guiding errors. PixInsight is now very good at sorting out these images on its own, but you should still make the program's job easier and click through the images yourself beforehand so that you don't have to start from scratch later if there are problems.

To do this, we use the Process Blink in PixInsight.

Add image files → Select All Lights

Apply an automatic histogram transformation to all images → Images are displayed at the same brightness

For images that have a strong error (clear streaks on stars, etc.), remove the checkmark. Then select all images that have a check mark (ctrl + left click / cmd + left click) and then copy selected files to new location into the final light folder. 

Part 3: Stacking via WBPP (Preprocessing)

WeightedBatchPreprocessing (WBPP) is used to calibrate and stack all images. You add all the frames, set the right settings and let the program run. The script is incredibly large and complex, which is why I'm only providing a short, easy way to deal with it here. 

3.1         Loading images

Script Batch processing WeightedBatchPreprocessing

Add All Frames: Select Directory → Data Folder → Open

3.2         Settings

After all frames have been added, set the output folder: Select the outpoot root directory → Select the WBPP folder created in 2.1Open

As mentioned above, WBPP is too complex to go into detail here. Often you have to change the settings for each image by frequent testing, e.g. to remove lines from airplanes without deleting the entire frame. Therefore, I recommend learning the process and mastering it by frequent practice and testing as well as other tutorials. For this tutorial, we'll run WBPP with default settings. Here's what it should look like:

Autocrop should be enabled.

Run

Part 4: Processing

4.1         Combining Mono Images (LRGB)

This step is only relevant if you are taking pictures with a mono camera and color filters. If you are using a color camera, you can skip this step. If you aren’t using an L-filter (Luminance), you can skip the steps that deal with it.

 

In order to merge L/R/G/B mono images into a finished RGB image, the stacked master images must contain exactly the same section of the sky. That’s why it was important to  enable Astrometric Solution and Autocrop in 3.2, as this feature takes care of aligning the images as well as cropping bad corners and edges. If Autocrop did not cropped as desired, you can run WBPP without Autocrop enabled and then use ImageSolver, StarAlignment and DynamicCrop to get a better result manually.

 

Double-click on the workspace to open the directory, select all (L)RGB master images, and open them. 

 

Right-click on an image → Identifier and simply name the image after the respective filter, e.g. "R".

Using ScreenTransferFunction (STF), you can brighten the image as a kind of preview to see the content. The image remains linear (i.e. it is not stretched), only an auto-stretch is applied to the display so  you can see something and not have a black image in front of you.

 

ScreenTransferFunction → Click on the image → Auto Stretch (small radioactivity symbol)

ChannelCombination → Enter R, G, B in the correct fields, and click Apply Global

It is best to rename the created image to "RGB".

With the help of STF, you can again use an Autostretch to see the preliminary RGB image. Before the L master image is added to the RGB image, both still need further editing. The combination takes place in 4.7.

 

Attention: 

Steps 4.2, 4.4, 4.5 and 4.6 are to be applied to both the RGB image and the L master image!

4.2         Background Extraction

There are various ways to remove gradients in the image, which are mainly caused by light pollution or moonlight. In the following, the plugin GraXpert is used, but you can also use AutomaticBackgroundExtraction or, for full control, DynamicBackgroundExtraction.

Subtraction is used for gradients caused by light pollution and division is used for vignetting.

 

ScriptToolboxGraXpert


For Image, select the respective image → Execute

4.3         Color Calibration

In order to establish the correct coloring in the image, it is necessary to calibrate the color. The best way to do this is by using SpectrophotometricColorCalibration (SPCC). In this process, the camera and filters used are taken into account, resulting in an almost perfect color balance.

If the instruments used are not known/available, PhotometricColorCalibration (PCC) can be used as an alternative.

In any case, ImageSolver must first be applied to the image.

 

In the Calibration section, the instruments used must be entered:

White reference:               
Average Spiral Galaxy

 

QE curve:                             
The sensor of the camera used must be entered here. The designation is either derived from the name of the camera (e.g. ZWO ASI533) or can be found in the camera's technical data. (If the sensor is not in the list, or cannot be found, select Ideal QE curve.)

Red/Green/Blue filter:       
The filter used in each case must be entered here. If a DSLR camera was used, select the camera model, if available. 

Enable Background NeutralizationRegion of Interest

→ Use this button to create a new preview:

Now click and drag to create a rectangle in the image that 

contains neither stars nor nebulae or the like, only pure

background.

Click on From Preview and select the preview you just created.

Then confirm and apply the Process.

4.4         Deconvolution and denoising

A normal step in processing is sharpening. However, sharpening is only a description for the exact term, deconvolution. This describes the downsizing/refining of the structures. BlurXTerminator is the easiest way to do this. It also corrects for errors such as bad stars in the corners, or guiding errors (to some extent).

You can also try the process deconvolution, but you will probably never get as good of a result as an AI-powered plugin.

 

In addition, the image must be denoised, which significantly improves regions with low light. Again, NoiseXTerminator is the best and easiest choice.

Deconvolution must always take place before denoising!

a)   Deconvolution

You shouldn't overdo it with BlurXTerminator, so that the image doesn't become too artificial and falsified. 

For Sharpen Stars, I recommend a value of around 0.25-0.35.

Adjust Star Halos should be very low, if at all 

(-0.1, 0.1).

Enable Automatic PSF, Sharpen Nonstellar to 0.9.

 

Open BlurXTerminator → change settings → apply

b)   Denoising

Like BlurXTerminator, NoiseXTerminator should be used wisely.

Denoise at a maximum of 0.70, for Detail I recommend a maximum of 0.25, but usually even less.

Open NoiseXTerminator → change settings → apply

4.5         Removing the Stars

In order to stretch the entire image in the best possible way, the stars should first be removed and then stretched separately. 

Either StarXTerminator or StarNet2 can be used for this.

 

Open StarXTerminator → change settings → apply

or

 

Open StarNet2 → change settings → apply

For the star layer, only the stars from the RGB image are used, so the L-stars image can be closed.

4.6         Stretching

There are many ways to stretch Astro-images. 

In my opinion, GeneralizedHyperbolicStretch (GHS) is the best one, because the process offers a lot of controls.

There are 2 iterations explained in the following paragraph, the first one to stretch the image slightly and the second one to add contrast. I recommend practicing the process frequently and attentively, as stretching is pretty much the most important step in processing. GHS offers a lot of settings, I'll explain them briefly.

 

Stretch factor:
Self-explanatory

 

Local intensity:
How high the contrast of the stretch should be

 

Symmetry point:
The point in the histogram around which the contrast is increased, i.e. anything brighter than this point becomes even brighter; anything darker than this point will get darker

 

Protect shadows:
Protect dark areas to prevent clipping

 

Protect highlights:
Protect bright areas to prevent clipping

 

Disable STF autostretch to see the correct preview of the image → Open GHS → Open Real-Time Preview

→ Use the magnifying glass at the top right to zoom in until you can see the mountain in the histogram (you may need to scroll to the right a bit) 

→ Click in the horizontal center or just to the left of the center of the mountain, a yellow line will appear

Send to SP

→ Zoom out with the rightmost magnifying glass

local intensity to approx. 8 - 8.5

→ set the stretch factor so that the largest peak of the histogram is at most at 1/4 of the complete graph

apply

Reset settings with the button at the bottom right

To increase contrast: 

 

→ set the SP by clicking in the preview at a point around which the contrast should be increased

Send to SP

local intensity to approx. 1-1.5

Carefully set the stretch factor, maximum to 0.5-1

→ Play with both Protect sliders so as not to ruin the image

Of course, even more iterations can be used to further enhance the image.

To better check the stretch you have just set, you can toggle between the preview and the current image in the preview window:

Since the picture usually lacks some color at this point, you should strengthen it a bit.

 

→ Open CurvesTransformation

→ Open Preview

→ Select S

→ Gently pull the center point up to the left

→ Apply

The most important thing about stretching is not to overdo it. If the data just isn't good enough, you can't get a better result out of it.

The danger is that either the black points or the white points will be clipped to make the image more dramatic. Also, excessive stretching only brings image defects and noise to the forefront. If the image does not give the desired result even after perfect processing, then the only thing that helps is collecting more data.

4.7         Combining L + RGB

The L image is used to increase detail and contrast in the RGB image. For the combination to succeed, RGB and L should be stretched similarly. The Process LRGBCombination offers possibilities to adjust Lightness and Saturation in the combination, you can test a few different settings and see how the result changes in each case. The two values must always add up to 1, e.g. 

0.5, 0.5 or 0.45, 0.55. 

 

→ Open LRGBCombination 

→ Enter the name of the L image for L

→ Disable R, G, B

Apply to RGB image

4.8         Adding stars back in

To retain the color in the star layer, I recommend either stretching it completely using the process ArcsinhStretch or using a bit of ArcsinhStretch and then GHS again.

PixelMath is used to add the stars back to the RGB image. Alternatively, this can also be done later in a “normal” image editing software such as Photoshop

 

→ Open ArcsinhStretch

→ Open the preview of the RGB_stars layer

→ Set the stretch factor so that the stars are clearly visible, but not overstretched

Apply

→ Open PixelMath

→ Enter the following formula in RGB/K : ~((~starless)*(~stars))

Of course, starless and stars should be replaced by the current names of the images, so in our case it should look like this:

 

~((~RGB)*(~RGB_stars))

→ Apply to RGB image

Part 5: Final Editing

There are many different ways to proceed from here, and everyone has their own preferences. Either you edit the image further in PixInsight, or you export it as TIFF and edit it in an image editor like Photoshop. Steps such as color saturation, contrast enhancement, brightness adjustments or the like can be done there. However, you again should be careful not to overdo it and falsify the image.

Of course, you can apply a signature to your masterpiece here. ;-)

Conclusion

I hope this short and simple tutorial has helped you getting started with image editing in PixInsight. The software is incredibly powerful and complex, and there are so many more processes that can be used to improve an image. 

There is only one way to improve: practice, practice and practice some more.

As in the whole field of astrophotography, the learning curve is incredibly steep, but that makes the result all the more beautiful and satisfying. Try to get the best out of yourself and the images, be patient and inquisitive, but also be happy with your results.

 

One last thought: 

 

Take a moment to realize that YOU have taken this picture. From an object so unimaginably far away that it took the light thousands, millions or even billions of years to come to us, and you captured that light and immortalized it in a work of art. 

 

Good luck and all the best for your journey in astrophotography.

 

Johannes Maximilian Möslein
04. September 2024

Download this tutorial as PDF in English and German here: