Ipac logo

Education & Outreach: Classroom Lessons

Creating Color Pictures Using Images From NASA’s Wide-field Survey Explorer (WISE) Mission
  1. Introduction
  2. The Basic Process
  3. Image Processing Programs
  4. Artifacts
  5. Related Links
Introduction
makingcolor1

These instructions explain the basic processes for creating a color picture using images downloaded from the WISE Science Data Archive. First, we’ll provide an overview of the general steps you’ll take to create color images, and then we’ll describe several different image processing programs that you can use to take these steps. It’s assumed that you are beginning these instructions with 3 or 4 black & white images (in FITS format) of the same astronomical object gathered from the WISE archive. If you haven’t yet downloaded your images, please see the instructions in the previous tutorial first.

What are digital images?

Digital images are quite different and much more flexible than images taken on photographic film. They can basically be thought of as numeric representations of a two-dimensional image. Or, more precisely, they are a matrix of square pixels (picture elements) arranged in columns and rows. Each pixel is assigned a numerical value, so they can all be analyzed and adjusted using mathematical operations. This is not only very useful for science, but it also provides many unique options to digital artists. And as you’ll see, making digital color pictures is very much an artistic endeavor!

makingcolor2
What are FITS files?

The images that come from the WISE archive will be in the FITS format (Flexible Image Transport System). FITS is the most common format used in astronomy because FITS files can provide much more scientifically valuable information than other, more common, image file formats like JPEG,TIFF, PNG, and GIF. However, the most commonly used image processing software programs typically don’t recognize these FITS files. There are a variety of programs that do recognize them; some are free and some cost money. We will provide an overview of most of the free ones, including the pros and cons of each. We’ll also cover another free program (called FITS Liberator) that can convert FITS images into a format like PNG to be used in other image processing programs (such as Adobe Photoshop).

The Basic Process

Even though there are a wide variety of programs that you can use, the basic process of creating a color image from WISE data is always the same: You’ll start with 3 black & white (also called grayscale) WISE images, adjust each one independently, assign them individual colors, and then finally combine them together into one multi-color image.

Step 1): Adjusting the individual grayscale images

Often times the freshly downloaded grayscale images will not look very good when you first open them. They might appear to be very dark, or maybe only the brightest stars will be seen, with no sign of any nebulosity or faint details. This happens for complex reasons, but can usually be fixed with a couple of techniques: A) applying a logarithmic stretch function, and B) adjusting the brightness and contrast.

A) Applying the logarithmic stretch function

Most image processing programs come with a function that allows you to logarithmically “stretch” an image. The explanation for how it works is quite involved, but just remember that it’s a very useful function to use when you want to bring out faint objects while still being able to detect subtle differences in the brighter objects. There are many types of stretch functions, but they vary from program to program – we recommend the log stretch because it’s fairly universal and typically very effective.

B) Tweaking the brightness and contrast

Another way to bring out the best detail in each image is to adjust the brightness and contrast. These are standard options in all image processing programs. An excellent highly-recommended detailed explanation for what is happening to an image when you adjust the brightness and contrast (as well as image processing in general) can be found in this video tutorial (see Part 1: Images Are Data – the tutorial uses GIMP software […more info on GIMP below]). Often, a quick way to make an image look much better is to first apply the logarithmic stretch and then adjust the brightness and contrast.

Step 2) Assigning a single color to each grayscale image

makingcolor3

Most color images are made up of three main colors: red, green, and blue. In fact many professionals even refer to color images as ‘RGB’ images. The general idea behind creating a color astronomical image is to assign one of these colors to each of your three grayscale images, and then add them together. In other words, one image will be red, one image will be green, and the other will be blue. An image that was once varying shades of gray (white to black) will become varying shades of red (red to black). The same goes for the green image (green to black) and the blue image (blue to black).

Step 3) Combining single-color images into one multi-color image

The next step is to add all 3 images together. Once combined they’ll create one pretty color image that can show all of the colors of the full spectrum of the rainbow:

makingcolor4

However, it’s important to note that astronomers typically don’t randomly assign these 3 colors; they purposefully choose which grayscale image should be assigned to each color. The convention is that the longest wavelength image is assigned red, the middle wavelength green, and the shortest wavelength blue. For example, with WISE images, the W4 (22 micron wavelength) image will almost always be mapped to red, and the W1 (3.4 micron wavelength) image will typically be mapped to blue. That leaves the middle bands (either W2 or W3) being mapped to green. You may be saying “wait! there’s 4 bands available from WISE but only 3 colors that we can assign?” Well WISE was designed for science, not necessarily for pretty pictures, so it wants to provide as much data as it can. 4 bands are better than 3 after all. But a majority of image processing programs only want 3 images, because that’s all you need to make a nice color picture. There are a few solutions to this dilemma:

  1. Discard either W1 or W2. These 2 shorter-wavelength bands often show very similar features to each other, so losing one of them doesn’t mean you’ll be losing a lot of detail. Band 1 typically shows the least nebulosity (gas and dust) so it will typically be the one that gets thrown out, however it might be worth experimenting to see which you prefer. Bands 3 and 4 typically show the most nebulosity and detail, so you’ll probably want to keep them.
  2. Combine W1 & W2 together first. This extra step in the process involves averaging the band 1 and band 2 grayscale images to create one image, and then use that image as your blue image.
  3. If you have access to Adobe Photoshop (not free), there is a way to assign W2 the color cyan, and then add that color to the other 3. You’ll also need FITS liberator in order to get Photoshop to recognize the FITS files. This is what the professionals do, but the process involves several extra steps that require a deeper understanding of how Photoshop works.
Image Processing Programs

There are many image processing programs that can create RGB color images from FITS files. Each one is different. Some are easier to use than others, some have a lot of helpful instructions available online, and some provide extra advanced options for people who want to create the best image possible. Below we will highlight 4 free programs, and mention the pros and cons of each in relation to creating color astronomy pictures. If you already have a program that you are comfortable with (i.e. Adobe Photoshop), but it doesn’t recognize FITS files, then please see the section on FITS Liberator.

ImageJ (recommended)

Best for: Newcomers to making color pictures with astronomical images, as well as amateurs and professionals. By using ImageJ with the astronomy plugins added (following the instructions in the activity booklet linked to below), you can make quality color pictures relatively easily and quickly. 

Originally developed for medical imaging, ImageJ offers an extensive variety of functions and options. It can run on almost any operating system and is highly adaptable. Extra plugins can be installed to provide even more functions.

Pros:

  • A good set of beginner-level instructions is available
  • Intuitive process for making color images – you can adjust each single-color image separately and instantly see the results on the combined RGB image
  • Can do much more complex operations and activities if you want to pursue more

Cons:

  • Comes with copious options and menus, which can seem overwhelming and confusing
  • The process for downloading and installing the necessary components is more involved than with other programs.

The easiest way to get the proper ImageJ software and astronomy plugins downloaded and installed is to follow the instructions at the beginning of the activity booklet pdf found on this webpage. That same booklet contains instructions on how to make a color image.

A more extensive guide that goes into greater detail about using ImageJ to do technical astronomy-related operations and projects can found here.

SalsaJ

Best for: Teachers and students who will eventually want to use the software for much more than just making pretty color pictures. Also for non-English speakers. There are many classroom-oriented lessons and projects available that specifically use SalsaJ.

SalsaJ is designed for educational use and is meant to be student-friendly. It’s based on the ImageJ platform, but is particularly adapted to professional astronomy images, with the unnecessary and overly complex functions removed.

Pros:

  • Multiple classroom exercises have been created for it
  • Lots of instructions and additional lessons available online
  • Easy to install and use
  • Comes in versions for 11 different languages

Cons:

  • Relatively limited color-picture options compared to other programs
  • There are extra steps involved to make adjustments to single-color images and see results on combined RGB image
  • Online instructions are for older versions of SalsaJ (which look and function slightly differently)

The SalsaJ software and almost all of the related instructions and exercises can be found at the website for Hands-On Universe, Europe.

MicroObservatory Image

Best for: Teachers and students who want to have focused astronomy-based image processing activities. MicroObservatory Image is very streamlined, lacking many of the bells and whistles (learning distractions) that other programs offer.

MicroObservatory Image is also designed for educational use and is meant to be student-friendly. It’s also based on the ImageJ platform, and is even more focused on keeping the important functions in while taking out the most advanced options.

Pros:

  • Classroom-level instructions are available
  • Simplified operations make it a good student-level program

Cons:

  • Lacks more advanced options
  • Currently cannot open WISE images, but a newer version addressing this issue is coming soon

The MicroObservatory Image software and all of the relevant instructions can be found at the MicroObservatory homepage.

GIMP (Gnu Image Manipulation Program)

Best for: Anyone who wants to get into image processing in general, not specifically for making astronomical color images. It’s a good program for processes that aren’t necessarily related to astronomy.

GIMP (Gnu Image Manipulation Program) is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.

Pros:

  • A lot of options for free software
  • Many advanced functions and options
  • Has versions for many different languages

Cons:

  • Doesn’t handle WISE images very well (prefers 8-bit images where WISE provides 32-bit images), which can lead to low-quality results
  • Online instructions aren’t completely relevant to WISE data, need some educated interpretation
  • Comes with copious options and menus, which can seem overwhelming and confusing

Instructions on where and how to download and install GIMP and other related software can be found at this Chandra X-ray Observatory website. This site also contains a set of instructions for using GIMP to create a color image

A better (video) tutorial that teaches the basics of image processing as well as making color images with GIMP can be found on this Planetary Society website (in the first section: ‘Images Are Data’).

FITS Liberator

Best for: People who are already familiar with image processing and have their own favorite image processing program. FITS liberator is an excellent tool for converting FITS images into a format that other programs can recognize (e.g. png, gif, tiff, jpeg…)

FITS Liberator was developed by astronomers for astronomers. It has gone through many incarnations, so it’s very efficient and fine-tuned to do the things that astronomers need the most.

Pros:

  • Converts FITS images to formats used by other image processing programs
  • Can adjust the stretching and brightness/contrast of images
  • Saves metadata (important astronomical info about the image and the objects in it)
  • Used by professionals (along with Adobe Photoshop)

Cons:

  • Cannot create color images on its own

Instructions for how to download and install FITS Liberator,  along with a user’s guide and other educational resources, can be found at spacetelescope.org.

Common ‘artifacts’ that you may find in WISE images

Some of the images downloaded directly from the WISE archive will have obvious ‘artifacts’ or ‘defects’. These are parts of the image that do not accurately show what is actually out in space, but instead are created by the telescope’s optics or detectors. They’re typically found in or near very bright objects. There are many types of artifacts, but for the purposes of making color pictures there are 3 that are the most important to be aware of. Removing these artifacts from the images typically involves advanced image processing techniques that we won’t explain here, but it’s often helpful to be able to recognize them:

Saturated pixels: 

makingcolor5

These will appear as dark holes in the middle of bright objects. They’re created when certain pixels in the detector ‘overflow’ with too many photons. Think of them as places where the object was so bright that it overwhelmed the camera. An easy amateur fix for these is to ‘paint’ in white pixels to fill in the holes.

Latents:

makingcolor6

These will appear as bright spots surrounded by dark halos. They’re places where the camera had not yet recovered from the previous picture it took. The pixels in that part of the camera were still ‘warm’ from a bright object that hit the detector in the same spot during the previous image.

Ghosts:

makingcolor7

These will look like little rings. They often appear multiple times in one image, always in the same position relative to nearby bright stars. The brightness of the ghost varies with the parent star, but the size of the ghost does not. They’re caused by internal reflections inside the space telescope.

Image Processing Resources for Astronomy Teaching: http://www.phy.duke.edu/~kolena/imagepro.html

NASA’s Hubble Space Telescope information page on image processing and making color images: http://hubblesite.org/gallery/behind_the_pictures/

ESA’s Hubble Space Telescope information page on image processing and making color images: http://www.spacetelescope.org/projects/fits_liberator/improc/

Chandra X-Ray Observatory’s tutorial on image processing and making color images (using GIMP): http://chandra.harvard.edu/photo/tutorial.html

PhET's Color Vision simulation: https://phet.colorado.edu/en/simulation/color-vision

Causes of Color: http://www.webexhibits.org/causesofcolor/1BA.html

An article about other free image processing programs (that don’t necessarily recognize FITS images): http://www.unplggd.com/unplggd/roundup/10-free-photoshop-alternatives-for-mac-amp-pc-145709