I’ve written extensively about creating RGB astro images using FITS Liberator, SAOImage DS9, and JS9 and JS9-4L. Now, you can also use GIMP to load FITS files. FITS support has been available in GIMP since 2013 and recently support for FITS was updated to include greater bit-depths.

This article walks you through opening FITS files from an observation on the Trifid Nebula and then creating an RGB image from the three greyscale FIITS images.

Note Regarding Updates

There is another recommended way to handle FITS files and combine them into one RGB. While you can get average results with the method described here, you can get much better results with the method described here: Using JS9 to create an RGB image – this method uses an online-based FITS editor so there’s nothing to install on your system.

Result

The following is the result of opening the FITS files, colorizing them, and stacking the files:

As you can see from the image, there’s good contrast, and there’s lots of good color information in the image as well.

Download

You can download a sample set of FITS files to follow along in this tutorial. I took the image of the Trifid nebula, saved as FITS, and plate solved each of the images.

Creating an RGB Image From FITS Files

Start GIMP and locate the sample files.

1. Select File – Open As Layers

2. You’ll be presented with a Load FITS File dialog box, as shown. Simply accept the default options by clicking Open

3. Repeat the preceding step for each file, each time GIMP asks you

4. Note the names of the layers in the Layers panel at the bottom right of the screen

5. Rearrange the layers such that they are ordered, from top to bottom, Red, Blue, and Green as shown:

Set the Image Mode to RGB

The default image mode for FITS files is Greyscale so we need to change it to RGB color to be able to colorize the image.

From the menu, select Image – Mode- RGB

GIMP will perform some work to convert the image so this process might take a while.

Adjust Each Layer’s Levels Setting

1. Click the name of the Red layer to activate it

2. Select from the menu, Colors – Levels

3. Click Auto Input Levels

4. Click Ok to commit the change

5. Click the eye next to the Red layer to hide it

6. Click the name of the Blue layer to activate it

7. Select from the menu, Colors – Levels

8. Click Auto Input Levels

9. Click Ok to commit the change

10. Click the eye next to the Blue layer to hide it

11. Click the name of the Green layer to activate it

12. Select from the menu, Colors – Levels

13. Click Auto Input Levels

14. Click Ok to commit the change

15. Click the eye next to the Blue and Red layers to show them

Invert the Image

Invert the image so that it is the right way up, so that North is at the top; this step is optional depending on the orientation of your image. Click Image, Transform, Flip Vertically.

Colorize Each Layer

Start by selecting each layer and set its blend mode to Screen (You can find the Layer’s blend mode above the Layers panel – it usually says Normal with a small arrow next to it. Click the arrow and select Screen)

1. Click the name of the Red layer to activate it

2. From the menu, select Colors – Colorize

3. Click the colored rectangle

4. Fill in the fields as shown (R:1000, G:0, B:0) and click OK twice

5. Click the name of the Blue layer to activate it

6. From the menu, select Colors – Colorize

7. Click the colored rectangle as shown in the following screenshot:

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

9. Click the name of the Green layer to activate it

10. From the menu, select Colors – Colorize

11. Click the colored rectangle as shown in the following screenshot:

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

Save and export the image into your preferred format.

Conclusion

In this tutorial, I showed you how to open and adjust a set of FITS files using only GIMP. You learned about auto levels adjustments, layer blending modes, and colorization.