My arduous journey to the Lunar Reconnaissance Orbiter Camera images
Posted by Emily Lakdawalla
02-04-2010 14:41 CDT
It's been two weeks since Lunar Reconnaissance Orbiter mission released a flood of data to the Planetary Data System, but I haven't posted any pictures dug out of the camera data yet. This post will explain why. It's a long story, but I've learned quite a bit, and I do have images to show you. If you're not interested in how I got to those images, just skip this post and go to the next one.
So, on March 15, as part of Lunar Reconnaissance Orbiter's first release of their calibrated, high-quality science data to NASA's Planetary Data System, the Lunar Reconnaissance Orbiter Camera (LROC) team announced they were releasing more than 100,000 images of the Moon, totaling about 10 Terabytes. Yahoo! Let's go explore the Moon!
The first thing I do when I dive into a data set is to remind myself a little bit about the camera. LROC's Narrow-Angle Camera or NAC, like all the high-resolution cameras currently in Mars orbit, is a pushbroom camera: it has a linear array of detectors that are swept across the surface of the Moon by the orbital motion of the spacecraft, building up long, skinny image swaths. LROC's NAC actually has two identical cameras that operate side by side, NAC-R and NAC-L. Each camera takes an image that is 2.5 kilometers and 5,064 pixels wide, so the resolution is about 50 centimeters per pixel (or about half the max resolution of HiRISE on Mars Reconnaissance Orbiter). So when you get a right and left pair of LROC images, the total width is about 5 kilometers over about 10,000 pixels; the two cameras are aimed so that the two image swaths overlap by a few pixels. The LROC team can select the length of an image to be up to 26 kilometers or more than 40,000 pixels long, though not all of them are that long.
The next thing I do, as I explained in the most recent imaging class, is to head straight for the INDEX.TAB file. This is a text file that is always included with data releases to the Planetary Data System. It's actually a table, with one row corresponding to each image file, containing lots of metadata about the image: when the image was taken, where the camera was pointing, whether there was any compression or summation used, and lots of other stuff. Here's the root directory of the first LROC data release, and if you navigate into the INDEX directory, you can download the INDEX.TAB file -- all 89 Megabytes of it. (If you want to know more about what each column of data represents, you'll also need to download the file named "INDEX.LBL.")
So I downloaded it, and looked through it, and sorted it on various parameters, but I confess that this time the INDEX.TAB file didn't lead me anywhere particularly useful. There weren't any descriptive notes provided with the images that told me why they'd been taken or what feature they were pointing at; there was longitude and latitude information, of course, but, not knowing a whole lot about lunar geography, that didn't help me much. My first dead end.
The information in the INDEX.TAB file was, however, all Phil Stooke needed to locate the images in which he found all those Russian landers and rovers! How about those rovers? I thought it might be fun to look for their tracks. So I went to download the data for the image containing Lunokhod 1's final resting place and all its tracks. At the time, I got it from the Imaging Node of the PDS, but you can browse the photo here on the LROC team website. Browsing's not good enough for me though; I wanted to see the data at its full resolution, losslessly compressed, and at its full 16 bits of data depth so that I could pick out the subtle marks of the rover's wheels from the background of the lunar soil. So I queued the 500-Megabyte file for download.
An hour or so later, I had the file; but then what? How to view and manipulate it? The spacecraft team uses software called ISIS, but ISIS runs on Linux (and therefore also Mac OSX); as I'm a Windows person, it's unavailable to me. The reliable software NASAView was capable of opening the image, but in doing so it squashed the 16 bits down to 8 bits, destroying all the subtle details in the image. GIMP has a plugin that lets it open PDS images, but GIMP froze when I tried to open this enormous thing. And Björn Jónsson's IMG2PNG software choked on the file, throwing an error. I'd hit a second dead end. I posted a frustrated note on unmannedspaceflight.com.
Shortly after I posted that note I got an email from Bjorn; he was willing to update his software to handle the LROC images. On March 22 he sent me a new IMG2PNG executable that was able to convert the ginormous LROC image -- all 5,064 by 52,224 pixels of it -- to PNG format.
I happily opened the Lunokhod 1 photo and looked for the rover and lander. But something wasn't right. It took me a while to figure out what was wrong. Finally, zooming out to try to get a sense of perspective, it dawned on me that the image I was looking at didn't match the image that Sasha Basilevsky had posted showing the landing site: it was mirror flipped, left for right. Which was correct, the one I was looking at, or the version the Russians used? I hunted around for some image that I could use for context. After about an hour of that search, I had to give up; the cratered, flat terrain was really difficult to match in regional images. But the version on the LROC website matched the orientation of the Russians' map, so I could only conclude that the one that I had sitting on my computer was mirror-flipped. I emailed Bjorn.
Bjorn dug in to the LROC Software Interface Specification (PDF), a piece of documentation that's included in the DOCUMENT directory of almost every data set in the Planetary Data System. He surfaced with the following phrase from page 3 of the document: "one of the NAC frames from a NAC-L and NAC-R paired observation must be transformed such that both images have the same ground orientation," meaning that one of the two needed to be mirror-flipped. It seemed odd that this document didn't inform us which of the two needed to be flipped, the left or right frame, but for all the examples we'd downloaded so far it appeared that the right frame was the one that needed to be flipped, so he updated his code to flip the right-camera images as it converted them to PNG format.
By the time he'd got this latest version of IMG2PNG to me for me to test, I'd moved on from the Lunokhod images. It's cool to see hardware on the surface of another world, but LRO is really there to map interesting terrain; I wanted to work on images that were interesting because of their geology. But I was having a hard time figuring out how to locate an image that would not only be interesting, but contain a feature that I could explain.
The problem is, I don't know much about lunar geology. Mars geology I'm very comfortable with, because the processes that operate on Mars -- volcanism, faulting, sedimentary processes of erosion and deposition, windblown sediments, etc. -- are processes I learned about studying geology on Earth. But on the Moon, everything is foreign, in part because the lunar surface is so danged old; everything is worn down and softened by the unrelenting flux of large and small meteorite impacts onto a surface with absolutely no protection from space. Selecting LROC images at random, which is one perfectly reasonable way to explore a data set, I just found smooth field of craters after craters, of all different sizes, with nothing to provide a sense of scale. Some craters were fresher than others, but that was all I could say. I needed another referent.
Referent? Reference, then -- how about books? It's funny that books are now my last resort, but that's how it is. I pulled my copy of Geology of the Moon (copyright 1970), by the revered planetary geologist Thomas A. Mutch, off my bookshelf and cracked it open, thumbing through it to find interesting-looking pictures. Maybe I could pick one of the pictures of some interesting geologic feature seen in the photomaps produced from the Lunar Orbiter series of missions, and check out what it looked like in high resolution from LROC.
This wasn't fast. Mutch's book didn't provide latitude and longitude information on the images, but, fortunately, it did provide information on which Lunar Orbiter frame each photo came from. And thanks to the Lunar Orbiter Photo Gallery at the Lunar and Planetary Institute, it doesn't take much effort to figure out the approximate location of any given Lunar Orbiter frame. Then I could take latitude and longitude information from that page and plug it in to the search tool at the LROC website and see if there were any LROC images that seemed to overlap the interesting Lunar Orbiter pictures from Mutch's book. I had difficulty because I was still struggling with the scale; I didn't have a good sense for how much area an LROC image covered compared to the features I was looking at in the Lunar Orbiter photos. There were several false starts, in which I located cool-looking lunar features in Mutch's book for which I couldn't seem to come up with any corresponding LROC image. This wasn't surprising -- there's still a lot more mission left for LROC to image the moon, and it's not technically supposed to cover the whole Moon (though it may manage to with a mission extension) -- but it was frustrating.
Finally, though, I located a cool feature in a Lunar Orbiter photo for which there was really nice coverage in an LROC NAC image. Here's the Lunar Orbiter photo:
According to the scale bar on the image published in Mutch's book, the stripes (each of which represents the width of the roll of film Lunar Orbiter V used to record its images) are about 5 kilometers wide -- that is, the width of a single LROC swath.
It's a cool feature, sort of like a sinuous rille, except it's formed of connected elliptical shaped craters; I wonder if there are lava tunnels running underneath any of the septa between the craters? It's hard to say, and I don't think the LROC images will tell me, but it'll still be fun to look.
And then that mirror-flipping problem reared its head again. When I converted the right-camera one to PNG format, it was still mirror-flipped. What's more, the browse version on the LROC website was also incorrectly oriented! Now, while this didn't prevent me from appreciating the view of the rille I'd picked out from Mutch's book, it did prevent me from feeling like I could explore the LROC images without the crutch of an existing reference, and it prevented me from being ready to explain to anybody else how to go about exploring the LROC images. (To see the images, go to the next post.)
Maybe there was a problem in the IMG2PNG code? I sent an email to Bjorn asking him if the software was working correctly. The next day (he's in Iceland, so we're not often at our computers at the same time), he confirmed that it was. This particular image did not need to be flipped; we were wrong about how to figure out which one needed flipping. Another dead end of hopeless confusion.
There was nothing left for me to do but to email the LROC instrument principal investigator, Mark Robinson, to ask for his help in clearing up my confusion. I got an email right back from him saying he was free at the moment and to call him so that he could explain what was going on. I feel better now; Mark readily admitted that the flipping situation was very confusing. There is, of course, a good explanation for it, but it's complicated. Here goes!
The two cameras that make up the LROC NAC were built to identical specifications. That's good, because it simplifies the process and reduces the cost of their development and testing while also reducing the risk of unforeseen problems. The two cameras had triangular mounting brackets. In order to get the two cameras positioned as close to each other as possible (which makes it easier to mosaic the two images they capture), and because of space constraints where they were being mounted to the spacecraft, one of the two cameras is rotated around its boresight 180 degrees with respect to the other; this allows the two triangular mounting brackets to lie close together. As a result (quoting from the Software Interface Specification document), "The NACs are mounted such that pixel 0 for the NAC-L is at the is at the -Y (in spacecraft coordinates) end of its CCD and pixel 0 for the NAC-R is at the +Y end of its CCD." But since the cameras and their electronics are identical, reading the detectors from pixel 0 to pixel 5,063 results in one of the images being read off left-to-right, and the other right-to-left.
That explains why, if the NAC-L image is correctly oriented, then the NAC-R image is mirrored, and vice versa. But it doesn't explain why it's sometimes the NAC-R image that's mirrored but at other times it's the NAC-L image that's mirrored. Mark explained that to know which of the two images is mirrored, you have to have more detailed information about the spacecraft's trajectory. There are two other things that affect the orientation of NAC images. The first is the orientation of the spacecraft. In order to keep certain sensitive parts of the spacecraft out of direct sunlight -- in particular, the radiators that help channel heat away from the inside of the spacecraft to space -- the spacecraft is at some times during the mission rotated 180 degrees, so that it's facing one direction along its orbit at some times and the opposite direction at other times in its mission. When the spacecraft flips for thermal control, the direction that each camera scans along the surface also flips 180 degrees.
The second thing is whether the spacecraft captures images in a descending branch of its orbit or an ascending branch of its orbit. Because the Moon rotates so slowly, Lunar Reconnaissance Orbiter (unlike, say, Mars Reconnaissance Orbiter, Mars Odyssey, and Mars Global Surveyor) is not operated in a sun-synchronous orbit. Over the course of its mission, the plane of the orbit rotates slowly with respect to the plane of the terminator (dawn-dusk line). The camera only takes pictures on the half of each orbit where it's over the sunlit part of the Moon; for half of each orbit, the spacecraft passes over the Moon's night side (yes, the dark side of the Moon!). At one time, the spacecraft's view of the sunlit side of the Moon may happen on the ascending branch of its orbit, when it's moving from south to north over the sunlit side; it descends, moving from north to south, over the night side. Once about every six months, though, the plane of the orbit meets the plane of the terminator and then crosses it. Then the spacecraft's view of the sunlit side of the Moon switches to the descending branch of its orbit, and the polarity of the NAC images switches.
So, in order to know whether it's the Right or Left camera images that need to be flipped, you need information about the spacecraft's trajectory. And that information was not part of the March 15 data release. So Bjorn and I and the other guys on unmannedspaceflight.com and anyone else out there in the wider public are stuck inspecting each image pair and comparing to context images to determine which channel needs to be flipped. (The mission team, for its part, never even sees this problem, because they of course have access to the spacecraft trajectory information; the software they use to view and process their images knows how to account for the spacecraft's motion, so always presents the images in their correct orientation.)
Mark told me that there was actually a lively debate going on inside the mission about whether they should change the way they submit the data to the Planetary Data System, and go ahead and flip the images that need flipping. For them to do so would obviously help me, but it goes a little against a scientist's instincts, because it changes the data from the way it came down from the spacecraft. Of course, the "change" actually changes nothing in the values of individual pixels, it just changes the order in which the pixels are stored, so it's a benign and reversible change. For his part, Mark said, he didn't care whether they make the change or not; he's listening to the opinions within his team and says they'll come to a decision soon. But even if they do elect to go ahead and flip the images, it won't happen until the next data release. He was sympathetic to my confusion and took my vote for flipping the images (not that my vote will be a particularly important one!) In the meantime, Bjorn has released a new version of IMG2PNG that correctly converts LROC images but does not flip them.
After all of that, I'm finally beginning to feel somewhat comfortable with the LROC data. So, do I finally have some pictures to show you? Yes, I do. But I think I will put them in a separate post, because I have a feeling that only a handful of readers have followed me to the bottom of this one! You persistent readers win a cookie!
Before I end this post, a final note: while I had Mark on the phone, I asked him about the wide-angle camera images, which haven't really appeared anywhere (though he said some tiny bits of WAC images have actually been released; I need to hunt those down). He said that he was very hopeful, but not certain, that they would have a global wide-angle camera mosaic of the Moon ready for release in maybe six to eight weeks or so. The roadblock is something called photometric correction; the mosaic that they have now appears striped because the wide-angle camera's view is so wide that it sees the lunar surface at many different emission angles simultaneously, and the Moon looks strikingly different depending on the angle at which it's illuminated. He said they're 80% of the way to figuring out the photometric correction, and when that's done, they'll have a beautiful new global map of the Moon to show us. In the meantime, Bjorn's software will convert them to PNG, but they look a bit weird because they consist of numerous separate framelets.
Other related posts:
Fifteen years ago, Society members and passionate space advocates like you helped save the Pluto mission. Now we can do the same for missions to Europa and Mars.
Join over 27,600 people who have completed their petition and consider a donation to support advocacy efforts.