How can I make a color composite image using Spitzer and/or other data?
Scientists examine images taken at different wavelengths because different elements and compounds absorb and emit light at different wavelengths.
The Spitzer Space Telescope takes images at several wavelengths, with different cameras. For example, Spitzer took three separate images of M81: one recording IR radiation at 24 microns, one image at 8 microns and one at 3.6 microns. Keep in mind that shorter wavelengths (3.6 microns) represent areas with higher temperatures and longer wavelengths (24 microns) show areas of cooler temperature.
Note that the MIPS camera can take images at 24, 70 and 160 microns. The IRAC camera can take images at 3.6, 4.5, 5.8 and 8.0 microns. Here, only 3 wavelengths are shown, 24, 8 and 3.6 microns.
Notice the distinct differences seen in the object at different wavelengths. Also notice that the scientists have chosen to use color to represent the different wavelengths, but all of these wavelengths are much too long for human eyes to see. So scientists record these 'invisible' wavelengths and then use a computer to create images that are visible to us. Here, red indicates longer (cooler) wavelengths and blue represents shorter (hotter) wavelengths. This type of image is called a False Color or Representative Color image, meaning that the colors only represent wavelengths, and aren’t actually color as the human eye would see.
Scientists also use computer graphics programs to combine all of the images into one picture. Here, you can practice this layering technique. You will need a computer with an Internet connection and a graphics program such as Adobe Photoshop or MaxIm DL. Once the three layers are combined, together you get something that looks like this:
Here is a movie that shows how an optical image from Hubble is combined with an infrared Spitzer image to create a visible-IR composite image.
First, find data you'd like to use. You need at least three images, preferably at least one of which is Spitzer data just because we are who we are here, but really any three bands will work. See the downloading data page and/or Finding data at other wavelengths. If you can't think of a good object, try any Messier object. They're pretty much all in there.
Next, find a program you can use to combine the images. You may have a program in mind from your prior experience (such as MaxIm DL). But, you can also use a professional astronomy tool called "ds9." ds9 is free free and available for any platform. There is also a free program called "FITS liberator" that used to be a plugin for Adobe Photoshop but is now a standalone program. (Google "FITS liberator" to find the download page and instructions).
Conventionally, the longest wavelength of your stack should be red, and the shortest should be blue. You don't have to do it that way, however.
With real astronomical data, the FITS images (wondering what a FITS file is?) are generally going to be at least 16 bits deep, or in other words there are 216 levels of intensity in the image. Something like a gif is only 8 bits deep, or 28 levels. What this means is that your gif or jpeg will NOT look the same as your FITS image in your image manipulation program -- a FITS image has 16 shades of grey (or shades of color for each color of red, green, and blue), and a gif or jpeg has only 8. You will therefore have to experiment with stretches of the FITS images in order to see all the subtleties of color, and work with the details of how you want to save it to a gif or jpeg. All of this is literally an art, and you should (will have to) play around to find a stretch that shows whatever features of the data you wish to emphasize. There are many web resources with tips and tricks of how to do this, some of which are listed at the bottom of this page -- if you find more, please let us know so that we can link them in.
ds9 (http://hea-www.harvard.edu/RD/ds9/) is an astronomical image manipulation program. ds9 is available for a wide variety of platforms, including unix, and it's free. Most astronomers use ds9 or similar programs. ds9 is a pretty powerful program and has some basic analysis tools included.
The syntax from a linux or unix machine is simply:
From a Mac or Windows machine, double-click on the application to load it. To load an image, click on "File" (the pulldown menu or the button about a third of the way down the screen), then click "open" and load the image.
To load a 3-color image, FIRST click on Frame, then "new rgb", then you will get a pop-up window with the red/green/blue layers indicated. Pick the color you want to load. Then choose file/open and load the image. To load another layer, pick another color to load, and then file/open again.
In any case, you will have to adjust the stretch. To change this, click on Scale then "hist equ" (try other stretches too).
You can zoom in or out.
You can also stack up a bunch of greyscale images, line them up, and blink through them. Click on regular "new" (not "new rgb") and do file/open. Repeat as necessary to load all the images in. Click on Zoom/align wcs. Click on Frame/blink to blink them.
'Align wcs' puts north up. Drag the blue box around in the zoomed out view at the top to change what you see in the main window. Zoom in or out, then choose "align wcs" again before blinking.
If you don't like the color table, Color/more/ one of the options there (try them).
Using MaxIm DL
MaxIm DL is an image processing program that allows you to measure the position of an object (RA/DEC), scroll through multiple images to look for differences & similarities, make tri-color images and much more. NB: The instructions here date from maybe 2005(?) -- see Using MaxIm DL for more recent instructions, including videos.
To determine the Right Ascension and Declination of an object, import an image:
- Go to View on the tool bar, and select "Information Window". The information window pops up on the right.
- Look at the mode setting in the window, scroll down and set it for astrometric.
- Move the cursor around on the image, and notice the information changing in the window. You will get the x,y for the cursor, and the x,y for the centroid. The centroid is just the center of the object you are on. Below the x,y in each case you will have RA and DEC.
- The magnitude of the object also shows up to the right of the centroid RA/DEC, but the image may have to be calibrated. We are still working on that.
Aligning images in MaxIm DL:
- Open three images. Go to Process on the toolbar. Scroll down and select align.
- In the pop – up window select the files to be aligned and select ok.
- A new align image popup window will appear.
- In the window, select manual 2 star for the Align Mode.
- Identify 2 easy to remember reference stars in the image, then center on the first reference star in the 1st image and click, then center on the same star in the 2nd image and click; repeat for the 3rd image.
- Repeat the process centering on the 2nd star in each of the images. Then press ok.
- Now go to View on the toolbar, scroll down to animate, select add all, press ok.
- You can control the speed of the animation in the pop-up window. Experiment with various speed settings.
- You can also manually “blink” through the images by using the forward or backward arrows.
- To make tri-color images in MaxIm DL you will have to align the images. Follow the instructions for making tri-color images, assigning blue to the shortest wavelength, red to the longest wavelength and green to the middle wavelength.
- Before you click ok, select the align button in the upper right of the box. Follow the steps above for aligning the images (use the manual 2 star align mode). Press ok, and when the Combine Color box pops up again, press ok one more time.
Exercise: Layering images of different wavelengths together
- Get online and go to the Sky View Virtual Observatory (http://skyview.gsfc.nasa.gov) and click “Basic Interface” link.
- At this website you can select an object and look at it from many different wavelengths. We’re specifically interested in Infrared, so find the IR box. For our practice, we will use data from the 2MASS survey, and download FITS images at J, H, and K wavelengths. (FYI: The J wavelength is 1.25 microns, the H wavelength is 1.65 microns, and K is 2.17 microns.)
- For the Sky Coordinates or Object box, type in the coordinates or the name of your object. For example: type in M 51.
- Scroll down to the Infrared Surveys and select 2MASS J.
- Scroll down to Optional Parameters, and change image size to what ever you want. The value you enter is in degrees, so start off with a small value of 0.3. If you go to big it will take a long time to retrieve the image. (Don’t bother changing any of the other boxes.)
- Go to the Bottom of the page and hit the submit button.
- Underneath the image that pops up in the new image window, click on the FITS button, and download the fits file. Save the image as M51J. Do this for the other two wavelengths (H and K).
- You now have three images at different wavelengths. Go into MaxIm DL (or whatever other program you want) and open the J, H, and K band images.
- You want to create an RGB image, assigning the J band as blue, the H band as green, and the K band as red. To do this in MaxIm DL, select "color" from the menu, and drop down and select combine color. The combine color box will pop up. Select RGB conversion type, and assign J band as blue, the H band as green, and the K band as red. Click OK, and the image will pop up.
- If you would like to modify the strength of one of the color layers in MaxIm DL, go to Color and select Color Adjust. By clicking on any of the color images (try clicking Red a few times), you will increase the red levels in your image. Click Original to return to your original image and try a different color, or more than one color.
- In MaxIm DL, select save file as, and select for file filter "jpeg". Save it. Congratulations! You’ve just made a layered 3-wavelength image.
Questions to think about and things to try with making color images
- How does the number of stars differ across the bands? Which band has the most stars? The fewest? (Bonus question: why?) The most nebulosity? The least? (Bonus question: why?) Are there more stars in the regions of nebulosity, or less? Why?
- Create a three-color mosaic using ds9 or your own image processing program. Which bands would you choose? Why? What happens when you include a MIPS-24 mosaic in as one of the three colors with IRAC as the other two? Do the stars match up? Does the resolution matter? Can you tell from just a glance at the three-color mosaic which stars are bright at MIPS wavelengths?
- Which features are found across multiple wavelengths, beyond the Spitzer regime? Why?
- Obtain IRAS images from the web (via Spot or other methods) and line them up with the Spitzer images of comparable wavelengths (e.g., 8 um with 12 um, 25 um with 24 um, 60 um with 70 um, and 100 um with 160 um). How much more detail do you see with Spitzer that was missed by IRAS? Do you see more texture in the nebulosity? More point sources?
- How big is anything in the image you're looking at? (If you're working with IC 2118, for example, how big is the nebula?) (What do I mean by big?) in pixels, arcseconds, parsecs, and/or light years? (Hint: you probably need a distance to the object. If it helps, there are 3.26 light years in a parsec.)
- Which objects in your image have already been identified in the literature? (For example, if working on IC 2118, which stars in these images are the ones identified by Kun et al. in the literature?) Which ones are totally new objects that no one until you has cared about before?
Come up with your own mosaics and your own answers to these questions and then post your images and discuss your answers in discuss making 3-color images.
- ds9 http://hea-www.harvard.edu/RD/ds9/
- fairly nice interactive lesson on 3-color images from STScI http://hubblesite.org/gallery/behind_the_pictures/meaning_of_color/
- guide to image processing software for educators http://www.phy.duke.edu/~kolena/imagepro.html
- image processing exercise from SDSS project (includes exercises for teachers and students!) http://cas.sdss.org/dr5/en/proj/teachers/advanced/processing/
- guide to 3-color images from Chandra http://chandra.harvard.edu/photo/openFITS/ (pointer to tips for doing x-ray analysis with ds9: http://chandra-ed.harvard.edu/activities.html )
- article on how to make your own HST color images http://hubblesource.stsci.edu/services/articles/2005-02-10/
- article on "true color" vs. false color http://www.universetoday.com/2007/10/01/true-or-false-color-the-art-of-extraterrestrial-photography/
- flash presentation on "coloring space" http://chandra.harvard.edu/art/color/
- guide to 3-color images from LCOGT http://lcogt.net/en/book/basic-color-imaging-ds9-and-gimp
- another guide to 3-color images from LCOGT http://lcogt.net/education/article/how-make-color-astronomical-images-photoshop
- tutorials on processing planetary data (first one applies to any astronomy data) http://planetary.org/explore/topics/imaging/tutorials.html
- guide to making 3-color images using WISE http://wise.ssl.berkeley.edu/edu_making_color.html
- http://uranus.uaa.alaska.edu/rbseu/projects/imagemaking/index.html 3-color image tutorial from Univ Alaska
- FITS liberator http://www.spacetelescope.org/projects/fits_liberator/
- short guide to image processing with FITS liberator http://www.spacetelescope.org/projects/fits_liberator/improc.html
- Activity packet from Robert Marshall: Creating Colored Astronomical Images | download pdf here
- Classroom activity packet from David W. McDonald, Joy-Lyn McDonald and Micah McDonald: "Making pretty pictures: How Astronomers make images" : download pdf here
- Image processing tour by PBS' NOVA http://www.pbs.org/wgbh/nova/origins/hubb-nf.html
- Astronomy research journal article on image processing - Rector et al 2007, AJ, 133, 598 http://iopscience.iop.org/1538-3881/133/2/598/fulltext/
- How to make a true-color Landsat image - ok, satellites look down as well as up. Lots of photoshop recommendations here. http://earthobservatory.nasa.gov/blogs/elegantfigures/2013/10/22/how-to-make-a-true-color-landsat-8-image/?src=share
- "The Frightful Fallacy of “False Color”" by Robert Hurt http://astronomyviz.wordpress.com/2013/07/23/the-frightful-fallacy-of-false-color/
- http://www.planetary.org/blogs/emily-lakdawalla/2015/12291508-two-epic-photos-of-earth.html Two epic photos of Earth, but which is "true color"? by Emily Lakdawalla