How to Process Your Own Colour Images from Hubble Data
Open the Hubble Legacy Archive at http://hla.stsci.edu/. Click "Enter Site".
Locate the search box and the list of example searches below it. You can search for objects by a number of criteria: New General Catalogue (NGC) numbers, IPPPSSOOT names, proposal IDs, location, and even names such as "Eagle Nebula" which are referenced against the NASA/IPAC Extragalactic Database (NED)[2] X Research source or the SIMBAD Astronomical Database[3] X Research source when necessary.
For this guide, enter "NGC 604" in to the box, which is the New General Catalogue identification number for the "The Triangulum Emission Garren Nebula".
Click the advanced search link and select only the WFPC2 (Wide Field and Planetary Camera 2), WFC3 (Wide Field Camera 3), and ACS (Advanced Camera for Surveys) under Instruments. These cameras give the best images for compositing into coloured final products.
Change the Data Product to "Combined (Level 2)".
Click Search. This should return 62 results.
Locate the "Images" tab to sort the data as thumbnails for easy viewing.
Explore the results to get a feel for the data in the HLA. You can expand an image by clicking "Interactive Display" under a thumbnail.
Locate
the fourth image in the result for the search of NGC 604 above and you will find the file name "hst_05237_02_wfpc2_f814w_wf" below it. The second last item in the name (f814) is the filter used to take the image. The item directly before it (wfpc2) designates it was taken with the Wide Field and Planetary Camera 2.
Locate three separate filtered images to create your composite. The three images will later be combined to each represent one of the three colours in an RGB (Red, Green Blue) image. An example of a good set of filters would be WFPC2 F450W (Blue), WFPC2 F555W (Green), and WFPC2 F814W (Red).
To download your images, right click the "FITS-Science" link and "Save As" or you can click it to add the items to your "Cart" and download them in a batch by clicking the "Cart" tab at the top of the search results.
To work with FITS files you will need a small free application called FITS Liberator.[4] X Research source This can be downloaded from http://www.spacetelescope.org/projects/fits_liberator/download_v301/. Download and install either the Windows or Mac version depending on your operating system.
Open FITS Liberator and navigate to one of the files downloaded earlier. For
now, select hst_05237_02_wfpc2_f814w_wf_drz.fits.
Take a look around the software at the information and the different changes you can make. Play with some of the buttons and notice the changes to the image preview.
Click the "Reset" button on the left to return the image to its native form.
For now, you are just going to use a simple stretch on the images before you save them. Find the "Stretch" drop-down which contains a number of pre-sets and select Log(Log(x)).
Click "Save File" and save the TIFF file to an easily accessible location. Change the file name to match the filter (for example, save hst_05237_02_wfpc2_f814w_wf_drz.fits as f814.tif).
Do the same thing for the other two FITS images.
Open your first image in your editor ensuring the layer is named the same as the file. For now, use f814w.tif and call the layer f814w.
Place your second and third images above the first in their own layers; again, ensure the layers are named for the files. In Photoshop you can use File -> Place to accomplish this easily (be sure to rasterize the placed images).
Select your top layer and zoom in on an area with a number of stars.
Lower the opacity to between 50% and 60% so that you can see
stars from the layer below.
Look for stars that appear in both layers and nudge the top layer to make things line up.
Return the top layer to 100% opacity. Then hide it by clicking the eye beside the layer name.
Select the middle layer and lower the opacity to between 50% and 60%.
Hold the shift key to select both the middle layer and the hidden top layer (these images are now lined up so we want to move them together).
Locate a star that appears in the middle and bottom layers as a reference to line things up.
Return the middle layer to 100% opacity and unhide the top layer.
Use the shift key to select all three layers.
Use the selection tool to select an area of the image that you want to work with. Then use the crop tool to loose everything else. You may need to rotate your selection or all three layers to get the region you want––just remember that all three layers must remain selected so that you don't undo your work from above.
Rotate the final product however you like.
Select your top layer in Photoshop and click Ctrl+A on your keyboard to select the entire canvas.
Click Ctrl+C on your keyboard to copy the entire contents of the layer.
Click File -> New or Ctrl+N to
create a new image. It should automatically set the size to the size of the image you copied; the only thing you need to change is the bit depth of the image from 16bit to 8bit and the name of the image to the name of the layer you copied. (If you copied the layer called f814w, call the image f814w.)
Paste the copied layer to the new image using Ctrl+V or by going to the "Edit" menu and then "Paste".
Do the same thing for the other two layers until you have three new images, each with one layer. At this point you can close the original three layer image.
Flatten each image by right clicking the layer and selecting "Flatten".
On your third image, open the "Channels" window from the "Windows" menu.
Click the menu icon in the top right hand corner of the channels window and click "Merge Channels". If the merge option is greyed out, your images are either not flattened or are not 8 Bits. You can fix this in the Image -> Mode menu.
Select "RGB" for the mode and 3 for the number of channels and click OK.
Set your lowest filter as blue, the middle as green, and the highest as red. For this guide, it should be Red: 814, Green: 555, Blue: 336.
Click OK. You will be instantly presented with
a colour image. The outcome of the image will be affected by the filters chosen, and the settings used in FITS Liberator.
Use the level and curve adjustments on the various channels and the full image to reach a product you're happy with. Play with your results and you can make something truly beautiful. The image to the right is of NGC 6357 and was made using WFC F658N for blue, WFC F660N for red, and an average of the two for green using the same method with heavy post-processing.
A great project for any lover of astronomy with even a hint of artistic ability is to process the raw images taken by the Hubble Space Telescope (HST) into the coloured wonders we're used to seeing in print. Hubble data is presented in grey scale but with a free application download and any graphics editor you can turn the right combination of images in to either a close approximation of reality or a fantastical work of art.