I'm trying to figure out how to properly handle MOC images. I'm starting at http://ida.wr.usgs.gov/orb_page.html. The jpegs there are not advertised for scientific use; how do I get them into an appropriate format? Is the NasaView software the only option? Is it any good? What does it do for me that the jpegs don't?
Where to start
Okay, this prompted me to dust off and spruce up some old stuff I wrote up. Take a look at the MGS Data Tools story I just posted, it might help get you started.
Normally, I try to get people to focus on what they are trying to really accomplish down the line, as that usually determines what kind of software that they need to use for a particular application. However, in this case, I won't waste our time. If you are trying to do anything vaguely scientific with MOC images (or any planetary image data, really), you should use ISIS.
To start off with, you probably just want a cleaned map-projected view of the image. Get the raw data from the PDS. There is a program in ISIS (actually really a kind of script that runs several programs, but that doesn't matter to you) called moclevall (I use moclevall.pl from the command line). Run it on the MOC .imq image you got from the PDS. Use ISIS's qview program to look at the resulting beautiful cleaned map-projected image cube. From there you can use various ISIS utilities to convert the cube to a TIFF file for publication or decide that you need to do extra or different processing or whatever.
I made the cub -- now what?
This is good. I got the cub up in qview. Now, how do I stretch the image to bring out stuff in the dark? That is, I played with the values under "Options" "stretch options" but they didn't change anything. (I could probably do this later in photoshop though, if that's easier.)
I recall reprojecting being important for Galileo data. What is the projection of the cub, or how do I find out? Do I need to worry about this for MOC images?
And once I get what I want, how can I output the image to a tiff or something?
Thanks!
isis2tif
Yes, the "stretch options" don't work for me either, but if you visit the File->View menu, you'll see a dialog about image stretch. The default values stretch the image between 0.5 and 99.5 percent of the image values. If you want to try and play with the image stetch in qview these are the relevant knobs. However this is just for within qview, it doesn't change the values in the cube.
There are a host of ISIS programs for converting into and out of the ISIS cube format. For ISIS 2 they can all be found on the big list of ISIS programs. What you want is isis2tif.
Once you do that, you may run into a problem that your output image is the right size, but full of zeroes (black pixels). That issue was posted about on the ISIS Support Forums and there is a good discussion there, and that this is something that ISIS 3 will be better about.
The deal is that the pixel values in the ISIS cube can be and often are real floating point numerical values. Allowable pixel values in a TIFF are integers between 0 and 255. When you run the default isis2tif, it tries to preserve the numerical values. If those numerical values are I/F radiance values (as they often are), they'll have values between zero and one, meaning that you'll mostly get a TIFF full of zeros with maybe a few ones.
What you want to do is tell isis2tif what ORANGE (output range) to use. In other words, how should ISIS take the input values and convert them into values that will span the useful data range of integers in a TIFF file. Unfortunately, finding the right values for ORANGE can be time-consuming, but you can use that File->View dialog in qview to help you out. The default 0.5% and 99.5% values correspond to the numerical values under the "Manual Stretch" heading in that dialog.
However, since 99% of the time I just want a TIFF that looks like what I see in qview, I wrote my_isis2tif, which is a wrapper around isis2tif, which can also optionally call the ISIS hstret program. So to get a TIFF image that looks similar to what you see in qview (with the default 0.5% and 99.5% stretch), do the following:
my_isis2tif -o 0.5%:99.5% m0000000.lev2.cub