Update: If you are looking for information about combining three monochrome images into one using GIMP, visit this article:

A number of my recent articles have covered creating RGB images using only a few FITS files, often one FITS file for each color filter. While this works well, real-world observations are usually made up of multiple exposures to get a longer total exposure time on a target. With longer exposure time on the target, you get a higher signal to noise ratio and better overall quality image.

With multiple exposures, you end up with more than one FITS file for each color filter. While you could certainly convert each FITS file into a TIFF and manually align it, an automated process is faster and more accurate.

DeepSkyStacker (DSS) is free software that’s designed to make the process of combining (stacking) images easier, faster, and more accurate than doing it manually.

This article covers using DSS to stack images and then produce a final RGB image using GIMP. You’ll need to have both DSS and GIMP installed to follow the directions in this tutorial. Note the DeepSkyStacker is only available for Windows.

Notes Regarding Updates

While GIMP is useful, a more modern approach is to use Photopea.com, a browser-based image editor that’s very similar to Photoshop. Like GIMP, Photopea.com is free to use and you don’t have to install anything on your system to use it. There’s a link in this article to another article that explains how to use Photopea.com.

I also wrote an updated article that uses DSS, JS9, and Photopea.com for a better result than you can achieve using DSS and GIMP. Find the article here: Creating an LRGB Image Using DeepSkyStacker, JS9, and Photopea.com. This is the recommended approach because it produces a better result than you can achieve using GIMP.

The Result

I took an observation of NGC 1514 made up of five observations of LRGB exposures, resulting in a total of 20 files (five each of L, R, G, and B exposures).

For the sake of comparison, I used FITS Liberator to combine one set of LRGB exposures into a final image (I followed the directions in “Using FITS Liberator To Create An RGB Image”), and came up with the following:

The image has some detail in it, however, it is very noisy.

I stacked these exposures using DSS and combined them into a single LRGB result image as shown:

This image is a lot less noisy and there’s much more detail in the nebula. This is the key benefit of stacking multiple exposures: you have a much better signal to noise ratio.

An Overview Of The Process

This is a long tutorial so it helps to understand the overall process that’s binding all of the steps together.

DeepSkyStacker is very good at stacking images however any advanced image processing needs to be done using something like GIMP or Photoshop. As a result, this tutorial is split into four broad parts:

  • Software acquisition and Installation – if you don’t already have GIMP and DSS installed, this is where you do that
  • DSS Stacking – this is where we use DSS to stack individual FITS files to produce a master for each color
  • Combination, Colorization, and Blending – this is where we use GIMP to do the bulk of our editing and where we combine the masters into a final RGB image
  • Final Edits – this is where we use GIMP to perform the final changes to the image

This article includes sample FITS files of an observation of NGC 1514 for you to download so you can follow along. The link to download the files is in the sections that follow.

The steps to process the images are involved so you need to follow them carefully and this tutorial includes screenshots throughout to help clarify points.

I assume that you have both DSS and GIMP installed. If not, continue to the next section and download and install the software.

Learn How To Take Great Astro Photos

Learn how to take great astro photos using remote telescopes located around the world! It’s fun, easy, and there’s a whole community of astronomers just like you to interact with.

Check out my FREE book for more details! You can download the book right away and start taking your own images like this.

Acquiring and Installing DSS and GIMP

Download DeepSkyStacker from here: http://deepskystacker.free.fr/english/index.html

Follow the installation directions and take note of the directions at the top of the page.

Download GIMP from here: https://www.gimp.org/downloads/

Follow the installation directions to install GIMP.

Downloading The Samples

I have made my observation of NGC 1514 available as a sample download. The FITS files I used to create this tutorial are contained in the ZIP file, so you can follow along in this tutorial.

I plate solved some of the files so if you open them in JS9, AstroImageJ or some other FITS viewer, you’ll be able to view the astrometric coordinates.

Stacking Using DSS

The first thing we’ll have to do is stack the images. You stack images per color, so you end up with one stacked image for luminance, one for green, one for red, and one for blue – these are often called master files. Once we have these images, we’ll switch to using GIMP to combine the master images and perform edits and enhancements.

Use the following directions to stack the FITS files:

1. Start DSS and select Open Picture Files

2. Select the five Luminance files (filenames with _l_ in them)

3. Click Check All

4. Click Stack checked pictures

Configure the stacking parameters

You need to go through this process just one time:

a. Click the link next to Stacking Mode and select Standard and click Ok to close the window

b. Click the link next to Alignment Mode and select Automatic and click Ok to close the window

c. Click the link next to Method and select Average

Continuing on…

5. Click Ok to start stacking

The stacking process can take some time and there are multiple phases. When stacking completes, you’ll see a screen with a very dark image on it. This is the stacked image.

6. Click Save picture to file

7. Enter the name ngc1514-lum and select the Save as type as TIFF (16 bit/ch)

8. Click Clear List on the left and answer No to whether you want to save the list

Repeat the stacking process for the remaining colors. The general steps are as follows:

1. Select five color files (filenames have _r_, _g_, or _b_ in them)

2. Click Check All

3. Click Stack checked pictures

4. Click Ok to start stacking (there’s no need to configure stacking parameters because they are saved)

5. Click Save picture to file

6. Enter the name ngc1514-<color> and select TIFF (16 bit/ch)

Replace <color> with the name of the color you are stacking.

7. Click Clear List

8. Answer No to the Save Changes question

Your folder will contain some extra files with a TXT extension and files and files beginning with ‘Autosave’ – you can safely delete these files.

Using Photopea.com For The Remaining Steps

I published a new article that explains how to use Photopea.com instead of GIMP to perform the remaining steps. Using Photopea.com is a more modern approach and builds skills that are more portable than the skills you develop with GIMP. You can try both approaches to find out which you like more.

To continue by using Photopea.com, follow this link: Stretching and Combining Images Using Photopea.com

Adjusting the Stretch in GIMP

Now that we have the files stacked, we need to adjust them in GIMP before we can combine them into an RGB image. This process is called stretching because it modifies the image’s histogram to bring out the fainter details.

This is what the histogram looks like before and after stretching:

The histogram is hardly visible before stretching and is shifted to the right after stretching, making the fainter parts of the image more visible.

Use the following directions to stretch the images:

1. Start GIMP

2. Select File – Open and locate and open the luminance file called ngc1514-lum.tif

The file is very dark now, so we’ll have to do a Levels adjustment to make the details more prominent.

3. From the menu, select Colors – Levels

4. Locate the middle adjustment on the screen as shown:

5. Drag the middle adjustment to the far left until the two triangles are almost touching, as shown in the following screenshot:

The screen will become very light and this is expected.

6. Click Ok to commit the change

7. From the menu, again select Colors – Levels

8. Locate the handle on the left side, as shown in the following screenshot:

9. Drag the triangle from the left side toward the center, stopping just short of the spike in the graph, as shown:

Your goal is to get a dark background but still have enough contrast to show some detail in the nebula.

10. Click Ok to commit the change

11. Repeat the process from step two for the remaining three files.

You have all four files open in GIMP at this point – now we can combine them into an RGB image.

Combining The Files Into An RGB Image

In this section, we combine the individual images into one image having multiple layers. This process has you copy and paste each of the existing files into a new layer in a new file.

Switch to the Green file from the top of the GIMP window (select the tile for each file and note the name in the title bar).

1. From the menu, choose Select – All

2. From the menu, select Edit – Copy

3. From the menu, select File – New

4. Click the + next to Advanced Options

5. Select RGB Color in the Color Space option as shown:

6. Click Ok to create the new file

7. From the menu, select Edit – Paste As – New Layer

8. From the Layers panel on the right side of the screen, locate the layer called ‘Background’ (if you don’t see the Layers panel, press CTRL+L on your keyboard to show or highlight it)

9. Right-click the background layer, and select Delete Layer

10. Double-click the words ‘Pasted Layer’ and type ‘green’

Paste the blue file:

1. Switch to the Blue file from the top of the GIMP window (select the tile for each file and note the name in the title bar)

2. From the menu, choose Select – All

3. From the menu, select Edit – Copy

4. Switch to the Untitled file (the file you created)

5. From the menu, select Edit – Paste As – New Layer

6. From the Layers panel on the right side of the screen, locate the layer called ‘Pasted Layer’

7. Double-click the words ‘Pasted Layer’ and type ‘blue’

Paste the red file:

1. Switch to the Red file from the top of the GIMP window (select the tile for each file and note the name in the title bar)

2. From the menu, choose Select – All

3. From the menu, select Edit – Copy

4. Switch to the Untitled file

5. From the menu, select Edit – Paste As – New Layer

6. From the Layers panel on the right side of the screen, locate the layer called ‘Pasted Layer’

7. Double-click the words ‘Pasted Layer’ and type ‘red’

Paste the luminance file:

1. Switch to the Luminance file from the top of the GIMP window (select the tile for each file and note the name in the title bar)

2. From the menu, choose Select – All

3. From the menu, select Edit – Copy

4. Switch to the Untitled file

5. From the menu, select Edit – Paste As – New Layer

6. From the Layers panel on the right side of the screen, locate the layer called ‘Pasted Layer’

7. Double-click the words ‘Pasted Layer’ and type ‘lum’

Save your file in case you lose your changes; select File – Save and give your file a name.

Close the other files to save memory; you can choose to save the changes or not.

From the menu, select Image – Mode – RGB. GIMP will work to make some changes, so it might pause for some time.

Colorize Each Layer

At this point, we have a single image with three layers on it. Each of the layers is still in greyscale so now we need to assign a color to each layer:

1. From the Layers panel at the bottom right, click the eye icon next to each of the layers, except green

2. Click the word ‘green’ to activate the layer

3. From the menu, select Colors – Colorize

4. Click the rectangle as shown in the following screenshot:

5. Fill in the fields as shown (R:0, G:100, B:0) and click OK

6. Click the eye next to the blue layer

7. Click the word ‘blue’ to activate the layer

8. From the menu, select Colors – Colorize

9. Click the rectangle as shown in the following screenshot:

10. Fill in the fields as shown (R:0, G:0, B:100) and click OK

11. Click the eye next to the red layer

12. Click the word ‘red’ to activate the layer

13. From the menu, select Colors – Colorize

14. Click the rectangle as shown in the following screenshot:

15. Fill in the fields as shown (R:100, G:0, B:0) and click OK

16. Click the eye icon next to the lum layer

Change The Blending Mode

Now that all of the images are colorized, we need to blend them so that we can see a single combined image:

1. In the Layers panel, click the word ‘lum’ to activate the luminance layer

2. Locate the word Normal with an arrow next to it as shown in the following screenshot:

3. Click the down arrow and select Screen

Repeat the process for the red and blue layers

4. Save your changes

Final Edits

You now have a combined RGB image. These are the final edits:

1. Merge the layers – select Image – Merge Visible Layers

2. Click the Merge button

3. Select Colors – Levels

4. Adjust the Levels as shown in the following screenshot:

5. Use a Curves adjustment to bring out some more detail

a. Select Colors – Curves

b. Edit the Curves adjustment so that it looks similar to the following:

3. Click where it says Value, and select Blue

4. Edit the Curves adjustment so that it looks similar to the following:

 Save your image.

You can choose to crop your image so that the nebula is centered in the frame and zoomed in.

Select the rectangle selection tool from the location shown on the screen:

Draw a rectangle around the nebula. From the menu, select Image – Crop To Selection and save your work.

Conclusion

In this tutorial, you learned how to use DeepSkyStacker to create masters of L, R, G, and B images and then used GIMP to combine them into a final image. Along the way, you learned about how to use DSS and GIMP and learned how to perform edits to bring out the details in a faint target.

Want More Like This Article?

Check out the links at the right side of the page for more posts like this.