I have been showing you how to process images completely online using tools like JS9-4L by the MicroObservatory, JS9 by the Smithsonian and available at Slooh.com for its members, and Photopea – the free and online Photoshop-like clone.
Using those tutorials, you can produce a final RGB image in a relatively short time and you always get feedback about your progress.
In this tutorial, I replace JS9-4L and JS9 with the free FITS Liberator application. FITS Liberator is by ESO/NASA and is the de facto standard when viewing and working with FITS files.
Unlike JS9-4L and JS9, FITS Liberator makes few assumptions about your image and offers you a great deal of control over the process of converting FITS files into your final image.
Also unlike the other two applications, you cannot combine RGB FITS into a final image using FITS Liberator. Instead, you have to use an image editor to stack, align, and adjust your final image. I show you how to do that here using an online application called Photopea.
If you have Photoshop or GIMP you can use these directions as well. You might have to modify your selections for GIMP and the directions should work unchanged with Photoshop.
Since FITS Liberator offers so much control it can be difficult to get the stretch settings right. You recall, a stretch function is a mathematical function that shifts the pixels in your image’s histogram to add more contrast to your images. I show you a way to make it a little easier to get the stretch function right.
While you’re here, consider downloading my Free book about Slooh.com – Remote Astrophotography Using Slooh.com – A Handbook.
Note About OSC Cameras
Sometimes you only have FITS files from a One-Shot Camera/OSC that works to combine the individual color components into a single FITS file. In this case, follow the directions in this article: Using FITS Liberator with RGB FITS to create an RGB Image.
What You’ll Learn in this Tutorial
You’ll learn the following in this tutorial:
- Understand the advantages FITS Liberator provides over other methods
- How to open a FITS file, select a stretch function, and adjust the image for good results
- How to create an RGB image by stacking, assigning color and making adjustments
- How to locate and reduce noise in your image
- How to make final adjustments, crop and export your image
This tutorial offers you sample FITS files to work with and provides you with the final PSD file (Photoshop-compatible formatted file) for your review to help you better understand how to make adjustments.
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.
Why Use FITS Liberator?
When you have free and online FITS viewers like JS9 and JS9-4L available, why would you go to the trouble of downloading, installing, and learning to use FITS Liberator?
FITS Liberator offers you more control over the process of converting a FITS file into a TIF for further processing.
The online viewers have stretch functions like Log(x), power, square root, and a few others, while FITS Liberator offers many more options. Choosing the right stretch function makes a big difference in the quality of your final images.
FITS Liberator also makes it possible to adjust your image’s histogram, while that capability is very limited JS9 and completely absent in JS9-4L.
FITS Liberator also produces TIF files for its output, which offers better fidelity than JPG or even PNG. The online viewers only support PNG or JPG.
The Final Result
Let’s start with the end result to give you an idea of what your final image should look like:
Remember that this is based on three minutes of total exposure time on a six-inch telescope that does not have a cooled CCD. This image contains a number of stars that are clearly not round because the camera collected all of the photons it could (it saturated). There’s also some noise in this image from the CCDs mounted in the telescope at the MicroObservatory.
The image is made up of the RGB files created using FITS Liberator, along with adjustments to color, levels, curves, and other details – all of which appear in this article – to give us this final result.
You can download the final PSD file for this tutorial here. Please avoid opening this file using Photoshop because it has a significant green cast when viewed in Photoshop. Photopea displays this file correctly.
Compare Result with JS9 and JS9-4L
I thought it would be interesting to compare the final result we get with FITS Liberator to the final result you can get using JS9 and JS9-4L. Here are the results:
Both images were created by following the directions for each application on this website (directions for JS9-4L, directions for JS9).
In both cases, you can clearly see the nebula yet the detail is lacking. The JS9-4L version has a red cast to it with many surrounding stars appearing red. The JS9 version is quite dark and lacks contrast. However, even with these flaws, the results are good because it took just a few minutes to create these images using nothing but a browser. These images are great for when you want a quick RGB image.
Acquiring FITS Liberator
You can download FITS Liberator here: https://www.spacetelescope.org/projects/fits_liberator/download_v301/
Follow the instructions on the page to download and then install FITS Liberator for Windows or Mac.
Download Sample Files
This tutorial walks you through processing a set of FITS files of the Trifid nebula that I took using the MicroObservatory.
Download the sample files of the Trifid Nebula FITS files here.
Uncompress the Zip file and save the files in a place that’s convenient.
Opening a FITS file and Applying a Stretch Function
When you start FITS Liberator by clicking it, the very first thing it does is display an Open window. Locate and select the blue FITS file of the Trifid nebula named ‘TrifidNebula190821035721-blue.FITS’
Review the controls on the screen; the buttons to open and save files are located on the right side. The main viewing area is at the top left, with information about the open file on the right. At the bottom is the open image’s histogram. Your screen should look something like this:
The image is washed out with little detail in it because the histogram is at the default values where FITS Liberator makes a best guess at what the correct settings might be. Depending on your image, it could start out too dark as well – it depends on what FITS Liberator guesses for the starting values for your histogram.
Let’s start by trying some stretch functions. Click the drop-down that lists the stretch functions, as shown here:
Select some of the stretch functions to see the effect on your image. As you make your selection, the image on your screen updates to reflect the changes the stretch function makes. Also note the shape and location of the image’s histogram.
Selecting a Stretch Function and Adjusting the Blue Image
For the purposes of this tutorial, let’s go with the Log(x) stretch function. Before you select it, click the Reset button on the right side of the screen to ensure all settings are at their default, then select the Log(x) stretch function.
The image still appears to be washed out because the histogram’s adjustment is set at the default values, which are best guesses.
Before we adjust the histogram, we need to get an understanding of our image. On the right side is an area labeled ‘Image Statistics’, as shown:
The area includes information on the values of the pixels in the image. The left column shows the actual values of the pixels, and the right column shows the value of the pixels after the stretch function is applied.
We are interested in the Stretched Median value here, which we’ll use as the basis for adjusting the Black Level of our image. Note the value of the Stretched Median and enter it into the box under the histogram labeled ‘Black level’, as shown:
Your image becomes much darker now, yet you still can’t see the nebula. This is happening because the black level is set too high, but the Median value is a good place to start.
Adjust the black level – its location is shown in the screenshot below, the mouse pointer is on the black level adjustment:
Move the black level to the left until you can see some of the nebula while leaving the background as dark as possible.
The value I selected for this blue image is 2.40 which I feel achieves a nice balance between the nebula and the background level.
Save the file by clicking the ‘Save File’ button and name the file ‘blue.tif’
We need to do the same type of adjustment for the other two images.
Selecting a Stretch Function and Adjusting the Other Images
Whenever you open an image, click the Reset button to ensure all settings are at their default, this is a best practice.
Open the red image, select the Log(x) function and note the value of the Stretched Median pixel value which is 2.44 for this image. Enter 2.44 in the black level box, and adjust the black level until you see the nebula. I selected 2.40 for the black level. Save the image as red.tif
The green image is a little different because it adds a lot of light to your final image, so in addition to adjusting the black level, we’ll also have to adjust the White Level.
Start as usual, select the Log(x) stretch function and enter the Stretched Median value in the Black level box. Adjust until you just see the nebula. I selected 2.43 because I want to keep this image dark.
Now adjust the white level to bring out some more detail in the nebula. I used the value 2.61. I experimented quite a bit to get this number.
The way you can determine if this white level is good is to adjust your image and then open the resulting TIF in Photopea. It won’t look the same as it does in FITS Liberator – chances are that it’ll be quite a bit lighter, so you’ll have to adjust until you get an image in Photopea that’s sufficiently dark yet shows the nebula.
You can go back and forth between FITS Liberator and Photopea to check your progress or you can simply make the black point adjustment and perform another adjustment in Photopea. I show you how to do this with the blue image below.
Save the file as green.tif
Introducing Photopea and the RGB Combination Process
So now you have three images, one from each filter. To make your final image, you need to combine the separate channels into a single RGB image. Unlike the online image viewers, you cannot compose a combined image using FITS Liberator. Instead, you combine the images using an image editor. While many use Photoshop, it is expensive and many people don’t own it.
Instead, we’ll use Photopea, an online Photoshop-like clone that runs in your browser, so there’s nothing to install and Photopea is free to use.
Start by opening the Photopea site at https://www.photopea.com/
The interface loads and is ready to open a new file. Note that the interface is very similar image processing software like Photoshop and GIMP and many of the functions are virtually the same and even in the same places on the menu.
In the following sections, I walk you through combining the individual images into a final RGB image. You have much more control over the whole process as compared to creating a final image using JS9-4L or JS9.
We’re going to use layers to create the combined RGB image. A layer allows you to stack images over one another and then change the blending mode to actually combine the images. We’ll also use some adjustment layers to not only add color, but also adjust vibrance and adjust Levels – all very powerful adjustments.
Opening and Placing Images In Photopea
Start by opening the file called green.tif. This will be the base layer and the order of layers affects the final image. I chose to put green at the bottom because it adds the most data to the final image, as compared to the red and blue images.
To open the file, from the menu, select File – Open and then open the green.tif file.
Next, we’ll add a new layer for the red image. Select File – Open and Place. This function will open an existing image and Place it over the current layer instead of opening the image on its own. Open the red.tif file.
Take a look at the Layers panel at the bottom right and note that there are now two layers. Double click on the name of the bottom layer and rename it to ‘green’. Double-click the name of the next layer and rename it to ‘red’.
Now the blue image is a little different. Open blue.tif (don’t Open and Place) and note that it is pretty light. We’ll have to make the background darker, otherwise, there will be too much blue in the final image.
This image is in this condition because all we did in FITS Liberator was to adjust the black level. We left the white level alone which caused this image to become lighter here. We can keep the adjustment in FITS Liberator simple and then come here and adjust the image, or you can make the adjustment in FITS Liberator – either way, you end up with a similar image.
Select Image – Adjustments – Curves from the menu. This brings up a new window with a graph in it. Adjust the graph by dragging the small circle at the bottom left of the curves adjustment window to the right, as shown in the following screenshot:
The goal is to make the image darker yet preserve the nebula and a curves adjustment is a very powerful tool. The adjustment we’re making here changes the image’s black point. Move the small circle located at the bottom left of the window slightly to the right as shown in the screenshot. Click Ok to commit the change.
From the menu, select Select – All and then select Edit – Copy. Use the tabs running across the top and select the one labeled green.psd. Now from the menu, select Edit – Paste. This adds a new layer with the blue image on it. Double-click the name of the new layer and rename it to ‘blue’.
Aligning Images
The images that you downloaded were taken on different nights, and the telescope moved slightly when it took the images, causing them to be out of alignment. So now we’ll have to align them manually.
Click the eye icon next to the red and blue layers – this hides them so that only the green layer is visible. We’ll use the green layer as our base to align the images.
Click the eye next to the red layer, on and off, and note that the image shifts quite a bit. Align the image as follows:
- Make the red layer active by clicking it and ensure that it is visible
- Click the drop-down menu just above the layers and select Screen; this causes the red image to blend with the green image. You should now see that the image has a lot more stars and has two Trifid nebulas
- Click the Move tool in the upper left of the Photopea toolbar and drag the image to align it with the green image below
- You can use the arrow keys on your keyboard to make fine adjustments
Next, align the blue layer. Turn off the red layer and turn on the blue layer. Align as follows:
- Make the blue layer active by clicking it and ensure that it is visible
- Click the drop-down menu just above the layers and select Screen; this causes the blue image to blend with the green image. You should now see that the image has a lot more stars and has two Trifid nebulas
- Click the Move tool in the upper left of the Photopea toolbar and drag the image to align it with the green image below
- You can use the arrow keys on your keyboard to make fine adjustments
Make all of the layers appear by clicking the eye icon next to it. Your image should not be blurry and you shouldn’t have any trailing stars. Let’s continue by adding color to each image.
Colorize Each Image
In this step, we’ll assign color to each layer. We do that by adding another layer over each image and then adjusting the color of that image. This process is called non-destructive editing because we don’t affect the underlying image with our changes – we’re simply adding an adjustment layer above it which can be manipulated independently.
Select the green layer and from the menu, select Layer – New Adjustment Layer – Photo Filter.
The Photo Filter casts a color over your whole image so we’ll use it to assign a color to each image.
Note that some tutorials have you use a Hue adjustment instead of a Photo Filter. Both adjustments work the same way, except that with the Photo Filter you don’t have to remember any ‘magic numbers’.
Click the small colored square in the window that comes up and use your keyboard to fill in the values of the R, G, and B fields as shown:
Enter zero in R and B, and 255 in G. This makes the color completely green. Click Ok to colorize the image.
Repeat the process for the red layer, but this time fill in the fields as follows: R=255, G=0, B=0.
And repeat the process for the blue later. This time fill in the fields using these values: R=0, G=0, B=255
You now have an RGB image of the three FITS files. It doesn’t look too good at the moment because we have to make some adjustments – remember this process gives you a lot of control and we’re going to take advantage of that now.
Adjusting Your Image
Let’s start by boosting the color in our image. Click Layers – New Adjustment Layer – Vibrance. Slide both sliders all the way over to the right side so that they are at 100% each.
Now we need to adjust how much color each layer is contributing to our final image. Because the images were taken on different nights, each contributes a different amount of light to the final image and this adjustment will take that into consideration.
- Click the letters ‘Pho’ next to the green layer. This activates the Photo Filter properties.
- Slide the Density slider so that it goes to 54%
For the red ‘Pho’ setting, set it to 14% and for the blue, set it to 11%.
I derived these numbers by experimenting with how the image looks on the screen.
The image is still a little washed out, so adjust the Levels to make it darker.
Make the Vibrance layer active by clicking it. Then from the menu, select Layer – New Adjustment Layer – Levels. Enter the values or use the sliders in the box to get the values as shown:
The values in the fields from the left are 0, 0.49, and 228.
I arrived at these values by experimenting with the effect the sliders had on the final image.
Reducing Noise in the Image
Looking at the image now, you’ll notice that there are other specs in the image that are not stars – they are coming from a source of noise in the telescope. The noise is particularly prominent on the blue layer.
You can see this noise by turning off all the layers, except the blue and green layers. Turn the blue layer on and off repeatedly and notice the specs that this layer introduces. We can easily reduce this noise by using a Median filter on the blue image.
Turn off the green layer and make the blue layer active by clicking it. You should now only have the monochrome blue image on the screen – all other layers should be off.
From the menu select Filter – Noise – Median. A new window pops up, which is asking for a radius of pixels to use to calculate the median values. Enter 1 in the box or move the slider. Flip the Preview checkbox on and off to examine this filter’s effect – it’s pretty dramatic. Click Ok to commit the setting.
Re-enable all of the layers to view the change.
Final Color Adjustment
The overall image is a little too red – some of the stars are red and the background has a red cast to it. We can fix that by adjusting the amount of color the red and green layers contribute to the image.
Click the ‘Pho’ box next to the red layer to open the properties of the Photo Filter we applied earlier. Adjust the number in the box to 14%.
Adjust the value of the Photo Filter for the green layer and set the property to 68%.
The image looks a lot more balanced at this point.
Cropping the Image
When we aligned the images, parts of the final image became unusable because only one or two layers covered a particular area, instead of all three layers. We’ll remove these unusable areas from the final image by cropping.
Cropping removes undesired parts of the image.
From the toolbar on the left, select the Cropping tool (5th icon from the top), or press C on your keyboard. Near the top of Photopea there are several options, one of which is ‘All Layers’ – click that to ensure that the Crop tool operates on all of the layers.
A bounding box appears with handles that you can grab by clicking to adjust the size of the box. If you hold down the Shift key while you move one of the corners of the box, the tool will ensure your selection remains a perfect square, regardless of how you move your mouse.
Select the cropping area that’s similar to the one shown in the following screenshot:
Press Enter to commit the change.
Saving Your Image
From the menu, select File – Save as PSD. Your browser downloads the image to your default downloads folder and it is named green.psd (PSD is a Photoshop file format and has the most fidelity for editing images).
Export Your Image as a PNG or JPG
From the menu, select File – Export As and select a format you’d like to use. PNG is the best format for images like this. Your browser will download the image to your downloads folder and name the file ‘green’ followed by whatever extension you selected.
Removing Color Gradient
If your image has a color gradient on it (a color cast), try my tutorial here where I show you how to remove the gradient: Removing Color Gradient From Your Images. If you find that process removes too much color, there’s a less harsh version here: Remove A Soft Color Gradient From Your Images.
Conclusion
In this tutorial you learned how to use FITS Liberator as part of the process in creating a final RGB image from sample FITS files of the Trifid Nebula. You also used Photopea to make adjustments to the image and export your final image.
Final Word
Did you like this article? Consider downloading my Free book about Slooh.com – Remote Astrophotography Using Slooh.com – A Handbook. I just ask for your email address to notify you of updates to this website and to the book since new features from Slooh.com are forthcoming.
You must be logged in to post a comment.