Here’s how to edit James Webb Space Telescope images
Do you feel like playing with telescope images in your free time?
There is a large community of people who use images from the James Webb Space Telescope to create spectacular images. Among them is Judy Schmidt, who recently created a spectacular image of the phantom galaxy (M74) based on Webb data.
Schmidt sat down with Space.com to show the basics of turning raw data into an image using free software along with standard image editing programs like Adobe Photoshop. Schmidt has 10 years of experience but says anyone interested can make beautiful images with a little experimentation and enthusiasm.
You can see more spectacular images of Webb photos and other cosmic objects on Schmidt’s Flickr page (opens in new tab). Many of the concepts discussed below are available in her 2017 YouTube imaging tutorial (opens in new tab).
Related: Stunning James Webb Space Telescope image shows stars forming in strange wheel-shaped galaxy
Gallery: The first photos from the James Webb Space Telescope
Judy Schmidt has been a hobby astronomy image processor for ten years. She earned a degree in Graphic Design and Multimedia from OSU-Okmulgee in 2003 and currently resides in Modesto, California with her son, cat and spouse.
Space.com: For someone brand new to this, where do I even look for these images? Where are the raw images stored?
Smith: It is part of the MAST archive (opens in new tab) [the Barbara A. Mikulski Archive for Space Telescopes.] Suppose we are looking for the phantom galaxy, its real name is M74. We simply type the name of this galaxy into the MAST search bar, just like when using Google. I usually like to use the advanced search because it’s just easier for me to filter out a lot of things.
[Editor’s note: Look at the left-hand side of the MAST archives webpage for the advanced search parameters.]
- Click the checkbox under Mission that says JWST.
- We must avoid the yellow and the orange results. The yellow ones are data you don’t have access to and the orange ones are scheduled observations. To filter these out, scroll down to “Data Rights” and select “Public”.
- Another very useful thing is “Calibration Level”. This is the “falseness” of the data. Choose calibration level 3 to get the aligned and balanced images.
- Also, make sure you select “Images” so we’re looking at images and not spectra.
Smith: Once you have that, I’ll explain the filters asap. There is a column in the image information that says “Filter”. It is metadata that shows what filter the telescope used to view an object. You can see it on the MIRI for example [mid-infrared instrument] side (opens in new tab) that F770 is 7.7 microns. In this example, 770 is the shortest wavelength at which these observations were taken. It’s important to know this because you want the shorter wavelengths to be bluer in your color image.
Space.com: Of course it would be if you used your eyes, right? There red wavelengths are longer and blue are shorter, right? Although we’re obviously using an infrared telescope, it wouldn’t be entirely analog.
Smith: Yes. Although the infrared filters are broadband, the different filters appear to contain different narrow emission lines.
Space.com: So overall the key would be to get a variety of filters with different wavelengths. You want longer ones, you want shorter ones. What is the minimum number you can work with? Two three?
Smith: I download them all and puzzle them until they look right. Once you’ve selected your image, click “Show Filter” and you can see a thumbnail. I’m not sure what I’m looking at with this M74 filter yet because it’s so small, but it looks great. If you want to take a closer look, you can click on a magnifying glass and the image will download to your computer.
Space.com: Once you’ve selected your dataset, how do you begin working with it?
Smith: You click on “Add data products to the download basket”. Make sure you don’t download everything you see first. At the moment I can see more than 1,000 files. I would recommend that you select I2D, the 2D rectified image. It’s a FITS file that seems pretty familiar to anyone involved in astronomy. The FITS file is compressed into a ZIP file.
Open the zip file with FITS Liberator (opens in new tab). It is free and available from ESA [the European Space Agency] so that people like me and hopefully more amateurs can get into image processing. Images often have an extremely high dynamic range that we need to adjust in order to actually see something. My favorite is using a stretch function called ArcSinh. [Editor’s note: Consult the FITS user guide (opens in new tab) for more information on all functions.]
Space.com: What does this feature do?
Smith: It takes the image from a linear display and basically applies a curve to that line so that the darkest parts of the image can get lighter and the lighter parts of the image can just stay. In this function look for the histogram. That will tell you where most of the pixels are in terms of brightness. The right side is the lightest part of the image and the left side is the darkest. You want to move the hill to the center of the screen. If we do that, we’ll have a cute little mound instead of a spiky angry mound.
Space.com: Now I can actually see details in the image. It’s not all black.
Smith: Now save it as a 16-bit file. (A 32-bit is overkill, an 8-bit is pixelated.) If you do this, make sure you always have a mirrored image selected. Otherwise, you get the view from the telescope, which has mirrors. I save it as TIFF, which is a very common file format. Next I apply what is called an adjustment layer (opens in new tab) in photoshop. [Editor’s note: Consult the Adobe Photoshop user guide (opens in new tab) for more information.]
The great thing about an adjustment layer is that you can go back and forth while editing. You don’t actually touch the pixels, which is called non-destructive imaging. I do it with pleasure. I like to keep the original in its pristine state so if I mess something up I can go back and undo it.
As I said before, I recommend downloading as many filters as you can, looking at each one carefully, and then deciding. That’s what I do.
Next, you have a grayscale image, so let’s convert it to standard RGB [red, green, blue] Picture. I put my one filter in a group, along with anything I modify, like curves. I’m like a file system. I can change everything in that group and then tell Photoshop to just have that group occupy the red channel. This makes a very simple color image.
Advanced tricks from here:
- Go to Advanced Mixing (opens in new tab) Crate. This is my way of isolating the filters into channels, for example by setting one to only populate red and another to populate only blue.
- If nothing is in the green zone, I can add another filter or create what is called a “pseudo green channel”. Basically, a pseudo green is created with the Channel Mixer (opens in new tab). It takes half the red, half the blue and puts those halves in the green channel.
- Make sure your RGB channels add up to 100 percent or as close to it as possible.
Space.com: If you’re ever stuck on how to manipulate an image, what are the steps you take to seek help?
Smith: I have no one to ask. There is no one. I just have to find out for myself.
Space.com: So you’re diving into the settings for Photoshop. You look at the MAST website. You also look at the MIRI filter website you showed me along with all the other tools of course and then take it from there.
Smith: It sure is a mystery. But I’ve been doing this for 10 years now, so it’s almost automatic for me.
This interview has been edited and abridged.
Follow Elizabeth Howell on Twitter @howellspace (opens in new tab). Follow us on Twitter @spacedotcom (opens in new tab) or on Facebook (opens in new tab).