JS9 is a FITS file editor that’s both built into Slooh.com and is available as a standalone application that runs on your browser, so you don’t have to install anything on your computer to use it.

While I have shown you in another article how to create an RGB image using JS9, that process is for a deep sky image; planetary images require a different processing strategy. In this article, I show you how to process an image of Jupiter using JS9 and Photopea.com.

Note that the processing steps I show you here are useful for images of planets like Jupiter and Saturn where the planet itself is easily resolved. You might have some luck with planets like Neptune, Uranus, and Venus, however, don’t expect the surface features to be well-resolved as they are with Saturn and Jupiter. When you capture images of Mars using Slooh.com, they usually only include one filter, so you could use some of the directions in this article with the exception of being able to assign color.

Sample Download

Here’s a ZIP file containing an observation of Jupiter and four of its moons:

Download sample observation of Jupiter

This observation includes the L, R, G, and B FITS files. This image was captured by a friend.

Result

This is the image I produced by using the directions in this article:

If you’re curious, the moons in this image are, from left to right, Calisto, Europa, Io, and Ganymede.

Overview of Creating a Final Image

These are the steps we’ll be following in this tutorial:

  • Start JS9
  • Open the R, G and B FITS files
  • Select a stretch function
  • Assign color
  • Set RGB mode
  • Align the images
  • Resize the image
  • Export the image from JS9
  • Use Photopea.com to perform final adjustments
  • Save the final image

Start JS9

You can start JS9 on the Slooh.com website by following the directions here, or you can use the standalone web application at the link below:

https://js9.si.edu/

The directions are the same regardless of how you start JS9.

Open the FITS files

Use JS9 to open the R, G, and B FITS files – we don’t need the luminance file for this process.

  1. Unzip and store your FITS files in a convenient location, or download your FITS files from your mission
  2.  Using JS9, if an image is already open, select File – Close – all images
  3. In JS9, select File – open local and open all three FITS files (RGB); alternately, use Windows Explorer (or Finder if you’re on a Mac) and drag the three FITS files onto the JS9 window. Your screen should look similar to the following:



Select a Stretch Function

The image you have now looks over-exposed because JS9 is using its default scale/stretch function which is more suitable for deep sky images.

A stretch function redistributes the values of the individual pixels in your image to make them visible on your screen. By default, JS9 uses the log stretch function which is more useful for deep sky images. For this image, we’ll use the linear stretch/scale function to more evenly distribute the pixels in this image. Do the following in JS9:

  1. From the menu, select Scale – linear

You’ll notice a dramatic change in the image on your screen – your screen should now look similar to the following:

Repeat the above step for each of the FITS files that you have open. To switch the active file to another one, from the menu, select File and then select another open file; the checkmark indicates which file is the active file. Finally, select the linear scale/stretch function for each file that you have open.

Assign Color

The images are in monochrome at the moment, so we need to assign a color that corresponds to the filter that was in use when the image was captured.

We use the Color Controls window to assign color to an image. You can bring up the Color Controls window by selecting from the menu Color – Color Controls. You can move the window out of the way of the image.

Next, you need to figure out what color filter was in use to capture the image currently on the screen – there are a couple of ways you can do that:

  • Take a look at the filename: select File from the menu and note the name of the file – the filter used is usually in the filename
  • Display the FITS header: select File – display – FITS header, find the ‘FILTER’ keyword on the left and note the color

Once you have determined the color, select the corresponding color in the Color Controls menu. You can find the colors under the menu on the left side of the window where it says ‘grey’ – click that and select the corresponding color.

This is what my screen looks like after assigning Green:

Repeat this process for each of the files that you have open. Once you finish assigning color, you can close the Color Controls window.

Set RGB Mode

Now that we have assigned color, we can convert the image on the screen into a color image. You can convert the image into a color image by selecting from the menu Color – rgb mode.

This is what my screen looks like:

We’re starting to see some good results now; however, the is some red on the left side, and some blue on the right. The colors indicate that the images aren’t quite aligned, so we need to align them by shifting pixels around a little.

Align Images

We’re going to have to shift the pixels around a little to align all of the images. If you’ve used JS9-4L from the MicroObservatory, you might be familiar with the Shift process which pops up a set of arrows that you can use to move your image around.

JS9 doesn’t have those arrows but you can still shift your images around – you do that using a simple command that you enter in a special console window. The command that you enter shifts your image around using X and Y coordinates you specify. We’ll enter the command a few times until the alignment is perfect.

We need to shift the red image to align it with the other images, so make Red the active image by selecting it under the File menu.

Now open the special console window that allows you to type commands for JS9: from the menu, select View – Console.

Type the following command into the console window (capitalization, spelling, and spacing all matter, so enter the command exactly as you see it here or just copy and paste it into the console window):

ShiftData 2 0

What this does is is move the red image two pixels to the right and zero pixels down. The image isn’t quite aligned yet, so try this command:

ShiftData 7 0

This command shifts the red image’s pixels seven to the right – now the red is correctly aligned.

There’s still some blue around the edges of Jupiter, and through some experimentation, I found the correct alignment. Make the Blue image the active image and enter the following commands into the Console window:

ShiftData 0 -4
ShiftData 2 0

In the first command, I moved the blue pixels down by four pixels and in the second command, I moved the image to the right by two pixels. I found these values by experimenting with the ShiftData command until I saw that the alignment was correct.

This is what my screen looks like now:

You can close the Console window now.

Resize the Image

JS9 resizes your image so that it fits in a 512×512 pixel window, and this often cuts off other parts of the image. Here, we’re going to resize the image to its original dimensions.

From the menu, select View – resize – set to image size and wait a few moments while JS9 works to resize the image.

You’ll notice that JS9 becomes much bigger in your browser window and this is expected because JS9 has resized itself to 1500×1500 pixels – the original size of the image.

Export the Image

Now that the image is back to its original size and includes the whole image, we can save it.

From the menu, select File – save – PNG.

Your browser will download a file that is named based on whatever file was active at the time you saved (likely the blue file). Check your browser’s Downloads folder for the file (the name is probably Jupiter_Blue.png if you are following along in this tutorial).

You’re now ready to bring out more details and improve the image using Photopea.com – the online photo editor.

Edit the Image Using Photopea.com

Open a new tab in your browser and enter the following address:

https://photopea.com

Open the file you just downloaded by selecting File – Open from the menu, and locate the file you just downloaded

The image is looking pretty good, however, we can bring out some more details by highlighting the four moons and sharpening Jupiter to bring out the details in the clouds.

Highlighting the Four Moons

The moons are in the image on your screen, but we need to perform an adjustment to make them visible. Here’s an overview of what we’ll be doing now:

  1. Duplicate the background layer
  2. Perform a Levels adjustment to bring out the moons
  3. Select all of the moons
  4. Delete the duplicated layer
  5. Perform a Levels adjustment on the moons
  6. Blend the moons into the image

The steps are pretty involved, but the result is a much better image than just Jupiter alone.

Do the following:

  1. From the right side of Photopea.com, right-click the Background layer and select Duplicate Layer


  2. Make ‘Layer1’ by clicking on the name
  3. From the menu, select Image – Adjustments – Levels
  4. Enter 3 in the box at the center as shown:



    What this does is modify the image so that we’re able to see the moons. Next, we’ll select the moons and then discard this temporary layer.
  5. Click Ok

You can now see the moons. Next, we’re going to select each of the moons. Do the following:

  1. Press CTRL and + twice – this zooms in the view so you can see the extent of the moons more clearly
  2. From the menu, select Window – Navigator

    You can drag the large red square around the image – the area within the red square is what is visible on your screen. You can furhter magnify the view by dragging the slider that is below the red square.

  3. Drag the red square so that the moons ot the left of Jupiter are visible on your screen
  4. Click hold over the dotted square near the upper-left of the Photopea.com window, as shown:



  5. Click Ellipse Select
  6. Zoom in more by using the slider below the red square so that the number is around 200
  7. Drag the red square around until you can see both moons that are to the left of Jupiter on your screen
  8. Click and drag near one of the moons to surround it in a selection (the dotted lines).

    Click just beyond the moon at the upper-left and drag towards the lower right to surround the moon in a selection – the dotted lines

  9. Press and hold the Shift key, and click and drag to select the other moon. This is what my screen looks like:



    When you press and hold Shift while making a selection, this adds to the existing selection, so you have both moons selected once you finish.

    If you make a mistake or just want to redo your selection, press and hold Alt and then make a selection that’s larger than the one you wish to correct. When you press and hold Alt while making a selection, the selection gets deleted without affecting your other existing selections.

  10. Drag the red square so that the moons below and to the right are visible on your screen. I adjusted the slider so that it was at about 145 so that both moons could fit on the screen
  11. Press and hold the Shift key, and click and drag to select the other moons. This is what my screen looks like:



    If you zoom out, you should have all four moons selected now.

  12. Right-click the ‘Layer 1’ layer near the bottom right of the window and select Delete
  13. From the menu, select Image – Adjustments – Levels
  14. Enter 2.5 in the middle box and click Ok

    This adjustment makes only the moons brighter. I found this setting by experimenting with the Levels adjustment.

  15. From the menu, select Select – Deselect – your moons should now be visible on the screen

If you zoom in on the moons, you’ll notice that the transition between the background and the moon is very harsh; we can blend in the moons so that they appear to be more natural. Do the following:

  1. Move the red box in the navigator window so that Jupiter is visible on your screen
  2. Click the dotted circle in the upper-right of the Photopea.com window to make the ellipse selection tool active
  3. Click and drag so that you surround Jupiter in a selection (the dotted lines). Remember to start your selection above and to the left of Jupiter, and drag toward the bottom right

    This is what my screen looks like:



  4. From the menu, select Select – Inverse

    What we are doing here is selecting everything except Jupiter in preparation for the next step, which blends the moons with the background

  5. From the menu, select Filter – Blur – Gaussian Blur
  6. Move the slider or enter 2.0 in the box and click Ok

    If you zoom in on the moons now, you’ll find that they blend into the image now. I found this value by experimenting with the effect the slider had on the moons.

Now we’re going to sharpen the details in Jupiter and save the image. Do the following:

  1. From the menu, select select Select – Inverse

    This action selects just Jupiter for the next adjustment

  2. From the menu, select Filter – Sharpen – Unsharp Mask
  3. The default settings are good for this image. You can click the Preview checkbox repeatedly to see the effect. Click Ok to accept the change
  4. If you would like to resize the image before saving it, select Image – Image Size and enter new values for the height and width (by default, the height and width are linked so when you change one, the other changes as well)
  5. Save your file as a PSD if you would like to keep it in native Photopea.com/Photoshop format or select PNG to export it as a PNG that you can share with others

Conclusion

In this article, you learned how to use JS9 to combine the RGB FITS images for Jupiter and learned how to improve the image using Photopea.com. Along the way, you learned about using JS9 and Photopea.com.