Help Shape the Future of Space Exploration

Join The Planetary Society Now  arrow.png

Join our eNewsletter for updates & action alerts

    Please leave this field empty
Blogs

Justin Cowart

A Sunset on Mars: Crafting a scene from archival data

Posted by Justin Cowart

08-03-2016 13:30 CST

Topics: pretty pictures, amateur image processing, Mars, Curiosity (Mars Science Laboratory), explaining image processing

Ever wanted to stand on Mars and watch a sunset? Unfortunately for many of us, it will never be something that we get to experience in person. But thanks to our robotic emissaries on Mars, we can get a sense of what it’s like.

At the end of Curiosity’s 956th day on Mars (April 15, 2015 back here on Earth), the rover watched the Sun set behind the western rim of Gale Crater. Curiosity’s Mastcam returned great color images of the sunset through its separate wide-field 34 mm (M-34) and narrow-angle 100mm (M-100) lenses, the real goal was to observe a transit of Mercury across the Sun – the last one visible from Gale Crater until 2024.

Curiosity sunset, sol 956

NASA / JPL-Caltech / MSSS

Curiosity sunset, sol 956
Raw image of the sunset on Curiosity sol 956 (April 15, 2015) taken through the 34mm Mastcam (M-34) lens.
Curiosity sunset, sol 956

NASA / JPL-Caltech / MSSS

Curiosity sunset, sol 956
Raw image of the sunset on Curiosity sol 956 (April 15, 2015) taken through the 100mm Mastcam (M-100) lens.

This image set was designed to take the shortest exposures possible to prevent the Sun from getting blown out. Tiny Mercury only covers a single pixel in the Mastcam M-100 instrument. If the Sun were to get blown out in these images (and sadly, it ultimately did), the glare would wash out any trace of Mercury’s disk.

Even with these short exposures, the Sun’s intensity caused a problem called “interline transfer smear”, where bright objects cause light to bleed into adjacent pixels in the same row on the sensor. This is what causes the bright pillars above and below the Sun in the raw images. To fix this, I carefully clone-stamped out these artifacts, providing me with a clean image to work with.

Such super-short exposures are great for capturing details on the Sun, but they severely underexpose the surrounding landscape. The result is that the sunset images have a low dynamic range, revealing far less detail than what a human standing in Gale Crater would see.  There is no way to pull detail out of the murk, if that detail was never recorded.

Fortunately, the imaging team was thinking ahead. Earlier in the afternoon of Sol 956, they scheduled Curiosity to take a high resolution mosaic of the landscape in the general direction of the sunset. With a little bit of Photoshop magic, it was possible to use this image to get the best of both worlds out of the sunset image – a richly detailed landscape with the more subdued coloration typically found near sunset.

Curiosity's view, sol 956

NASA / JPL-Caltech / MSSS / Justin Cowart

Curiosity's view, sol 956
Landscape in the direction of the sunset late in the afternoon of Sol 956 (April 15, 2015). This high-resolution image was stitched together from six frames taken through the 100mm Mastcam (M-100) lens.

To do this, I set the landscape image to grayscale. This preserved the detail visible in the foreground, but prevented the color from contaminating the color information present in the sunset image. Otherwise I would have ended up with a bright purple foreground! I also cut out the sky near the top of the image, since the subtle gradients in brightness changed dramatically between the time this landscape image was acquired and the time of sunset.

I then aligned the landscape on the Mastcam M-34 sunset image. This gave me a direct comparison between the images so I could tweak the relative brightness of the dunes and crater rim to match the sunset image. Once I was satisfied with the results, I used the M-34 image to recolorize the foreground and provide the proper sunset hues.

With a few other cosmetic adjustments, such as replacing the distorted pixel-bled Sun in the M-34 image with the undistorted Sun in the M-100 sunset image, I finally had a completed composite. Here’s the final result:

Curiosity sunset on sol 956

NASA / JPL-Caltech / MSSS / Justin Cowart

Curiosity sunset on sol 956
This composite image is constructed from a 6-frame Mastcam M-100 mosaic of the foreground taken in the late afternoon of Sol 956 and Mastcam M-34 and M-100 frames taken at sunset on the same sol.

The relative brightness of the land and sky are the same as in an actual sunset, and the increased level of detail matches what the greater dynamic range of the human eye would see. There are a couple of things that would be slightly different, though. For example, the shadows would be longer and pointing in a slightly different direction due to the change in Sun’s position from late afternoon to sunset. But overall the final composite will give you a pretty good idea of what it was like to be standing on Mars when Curiosity snapped these pictures.

Making these images wouldn’t have been possible without using the high-quality images archived in NASA’s Planetary Data System. Many of the images released here on the Planetary Society blog make use of raw frames immediately available to the public, which is nice for following along with Curiosity’s exploration of the Red Planet. However, these are low-quality JPEG images that have been highly compressed before being released to the public.

I would like to take a moment to encourage exploration enthusiasts to dig into the images archived in the PDS. These images have been calibrated to remove vignetting and lens distortion present in the raw images. They have higher bit depth, preserving more detail in shadows. They represent the full quality of the data originally returned from Mars. They’re also color-balanced so that the view more closely resembles what a human astronaut standing on Mars would see. (The raw images often have a strong greenish cast). Ultimately, they provide us with a much cleaner and more realistic view of Mars.

There are a few tools available to help find these images. The most helpful is the Curiosity Analyst’s Notebook, which provides an overview of what Curiosity was doing on any given day, along with mosaics and links to download the calibrated data. Another useful link is Michael Howard’s Midnight Planets Curiosity sol page. Although this site only archives the raw images direct from the spacecraft, I find it useful for looking at what Curiosity was doing at a glance before diving more deeply into the analyst’s notebook.

There are plenty of gems like this still packed away in the archives, and I really want to encourage everyone to go look for them. Happy hunting!

 
See other posts from March 2016

 

Or read more blog entries about: pretty pictures, amateur image processing, Mars, Curiosity (Mars Science Laboratory), explaining image processing

Comments:

Jon Alexandr: 03/09/2016 02:54 CST

Can anyone use this Martian sunset image in a realistic comparison with a similar Earth sunset image in order to show an accurate representation of the apparent difference in the Sun's diameter as seen from the two planets?

Jon Alexandr: 03/09/2016 02:56 CST

Without subtracting the important role of scientific data visualization, it's nice when image software is used to create "photographs" that are closer to what the current human eye would see. It makes otherworldly images more accessible and relatable.

Leave a Comment:

You must be logged in to submit a comment. Log in now.
Facebook Twitter Email RSS AddThis

Blog Search

Essential Advocacy

Our Advocacy Program provides each Society member a voice in the process.

Funding is critical. The more we have, the more effective we can be, translating into more missions, more science, and more exploration.

Donate

Featured Images

NGC 4100
The Flaming Star Nebula (IC 405)
LDN 604 and GGD 30
Schiaparelli backshell and parachute landing location from HiRISE in color
More Images

Featured Video

The Planetary Post - Carl Sagan's Pale Blue Dot

Watch Now

Space in Images

Pretty pictures and
awe-inspiring science.

See More

Join The Planetary Society

Let’s explore the cosmos together!

Become a Member

Connect With Us

Facebook, Twitter, YouTube and more…
Continue the conversation with our online community!