Jump to content
PDS Geosciences Node Community

Blogs

 

Assigning Map Information to PDS Images in ENVI

In ENVI, you can assign map information to a PDS image based on values from the PDS label.   1. Download an image and corresponding PDS label file (.lbl extension) to the same directory. 2. Open the image in ENVI. It will not be map projected. 3. Select File > Edit ENVI Header and select the image. Click OK. 4. From Edit Attributes, choose Map Info... 5. Click Change Proj. 6. Unless you already have the correct lunar projection, create a new one (steps below assume projection does not exist). 7. Click New... on the Projection Selection dialog box. 8. Enter values based on label. For example, sphere radius 1738000 (notice in meters), projection type sinusoidal, 0 false easting and northing, 74 central meridian longitude. (False easting/northing not in the label.) 9. Save projection and map_proj file. Select newly created projection. 10. In the Edit Map Information dialog, enter values from the label. For example, image coordinate x,y of 1.5,1.5 (the upper left corner) might be 0,50 with pixel size of 400 m/pixel. Click OK to save map information and OK to save header.   Due to a technical issue, the original comments on this blog post were lost. A transcription of the comments can be found below.

Jennifer Ward

Jennifer Ward

 

Finding additional MER and Phoenix data sets

In the MSL, MER, and Phoenix Analyst's Notebooks, standard data sets can be found in the sol summaries, but additional data sets can be accessed, as well.   These data sets can be located through Resources for Curiosity, Spirit, Opportunity, and Phoenix. Both the MER and Phoenix resources offer additional data sets, data set documents, and a reference list.   In MER's additional data sets, you can access: APXS Oxide Abundance Data MI Merged Focal Sections Pancam Atmospheric Opacity Data Rover Motion Counter Data Inertial Measurement Unit Data Traverse and Crater DTMs and Radio Science Orbit and UHF Data   In Phoenix's additional data sets, you can find: Robotic Arm (RA) Data Atmospheric Structure Experiment (ASE) Data Telltale Data and Surface Stereo Imager (SSI) Data   Both MER's and Phoenix's data set documents contain Data Set Software Interface Specification (SIS) documents, Mission and Instrument Description (Catalog) Files, calibration, and errata files. However, those for MER also include the MER Archive Plan and those for Phoenix contain the Phoenix Archive Plan.   The Phoenix resources also provide a map of the landing site, sol documents grouped by subsystem, and various web resources linking to the Phoenix Mars Mission, Planetary Data System (PDS), and related NASA websites. The MER resources further provide Mini-TES locator frames, Coordinate System Definitions, software, and suggestions for further reading.

Christina Kreisch

Christina Kreisch

 

Downloading MER and Phoenix images for ENVI

Through the MER and Phoenix Analyst's Notebooks, sequences of images taken by Navcam, Pancam, Microscopic Imager, and Hazcam can be downloaded as multi-band ENVI formatted images for use with ENVI image processing software.   The images can be downloaded under Sequence Download in the Product Sequence menu for any sequence of images. By going into "Sol Summaries" (for Spirit, Opportunity, or Phoenix), you will be able to select a sol and then view the data products from the "Report" menu. By choosing a sequence of more than one image, the product sequence overview page will be displayed. Click on "Sequence Download" from the sequence menu (on the left of the overview page), and the various download formats of the images will appear. You can choose to download images from the left eye, right eye, or both.   For example, from Opportunity sol 262 let's download the Pancam data for sequence P2832 that starts at SCLK 151430923. We will save the data as an ENVI image.   Click to enlarge.   The above screen shot shows the window after clicking the desired Pancam sequence (1P151430923ESF36CLP2832L2C1) in the data products. Once you click on "Sequence Download," your screen will look like the below image.   Click to enlarge.   We can download data as ENVI image and header files from here. (These two files must be downloaded separately.) Let's display the data in ENVI by opening the File menu and then clicking "Open Image File." After loading the band, the image will appear (see below).   Click to enlarge.

Christina Kreisch

Christina Kreisch

 

Creating an RGB image from MER and Phoenix data

One of the many features of the MER and Phoenix Analyst's Notebooks is the ability to create an RGB image from three images taken by the Pancam stereo cameras.   The initial steps to create an RGB image are the same as for creating an anaglyph image. The RGB feature is found under Image Processing in the Product Sequence menu for a given set of images. By going into "Sol Summaries" (for Spirit, Opportunity, or Phoenix), you will be able to select a sol and then view the data products from the "Report" menu. By choosing a sequence with stereo images, the product sequence overview page will be displayed. Click on "Image Processing" from the sequence menu (on the left of the overview page), and then click on "Create RGB" to open the dialog.   Here, you can choose individual frames as the red, green, or blue elements based upon the frames' wavelengths. For Pancam left eye images, selecting filters 2, 5, and 7 for red, green, and blue, respectively, will best approximate the human eye. After selecting the frames, the RGB image can be created for display or download.   For example, from Opportunity sol 13 let's use the Pancam sequence P2376 starting at SCLK 129339802:   Click to enlarge.   The above screen shot shows the window after clicking the desired Pancam sequence (1P129339802EFF0300P2376L2C1) in the data products. Once you click on "Image Processing," your screen will look like the below image.   Click to enlarge.   After assigning the red, green, and blue images as left filters 2, 5, and 7, respectively, the completed RGB image (see below) is displayed.   Click to enlarge.

Christina Kreisch

Christina Kreisch

 

Creating an anaglyph image from MER and Phoenix data

One of the unique features of the MER and Phoenix Analyst's Notebooks is being able to create an anaglyph image from a pair of images taken by the Navcam, Pancam, or Hazcam stereo cameras.   The anaglyph feature is found under Image Processing in the Product Sequence menu for a given stereo pair of images. By going into "Sol Summaries" (for Spirit, Opportunity, or Phoenix), you will be able to select a sol and then view the data products from the "Report" menu. By choosing a sequence with stereo images, the product sequence overview page will be displayed. Click on "Image Processing" from the sequence menu (on the left of the overview page), and then click on "Create Anaglyph" to open the dialog. Here you can assign individual frames as the left and right components, and then create the anaglyph image for display or download.   For example, from Opportunity sol 262 we can choose the Navcam sequence F0006 starting at SCLK 151449877:   Click to enlarge.   The above screen shot shows the window after clicking the desired Navcam sequence (1N151449877EDN36DJF0006L0M1) in the data products. Once you click on "Image Processing," your screen will look like the below image.   Click to enlarge.   After assigning the left and right images, the finished anaglyph (shown below) is displayed.   Click to enlarge.

Christina Kreisch

Christina Kreisch

 

Getting ENVI to open your PDS image correctly

Applies to ITT ENVI image processing software versions 4.8 and earlier.   PDS images do not always open correctly in ENVI because of a bug in ENVI's PDS image reader. A fix is promised with the ENVI 5.0 release. In the meantime, here is a workaround for the problem.   Step 1. Get the correct image information from the PDS label.   The PDS label describes the image data. You will need to determine the following values from the PDS label: Image offset (in bytes)
Number of samples and lines
Number of bands
Data type
Band interleave
Step 2. Make corrections to errant values in ENVI's "Header Info" dialog.   Update the image header info within the ENVI program's "Edit ENVI Header" dialog. The detached ENVI header will be created with the correct values and the image will be displayed correctly.     EXAMPLE   As an example, let's use the Mars Express HRSC file H1183_0000_BL4.IMG, available from our PDS Geosciences Node archives at this URL.   This image has an attached label (there is a single file with the label information at the beginning and the image data at the end). The easiest way to get the needed values from the label is using the "more" command from the command line.   C:\home\me>more h1183_0000_bl4.img PDS_VERSION_ID = PDS3 /* FILE DATA ELEMENTS */ RECORD_TYPE = FIXED_LENGTH RECORD_BYTES = 1986 FILE_RECORDS = 20475 LABEL_RECORDS = 6 :   In ENVI, the image offset value tells ENVI how many bytes to skip at the beginning of the PDS image file before reading the image. This is determined by multiplying the number of RECORD_BYTES by the number of records before the beginning of the image.   In this example, the label shows RECORD_BYTES = 1986 ^IMAGE = 12 Therefore the image offset is 1986 * 11 = 21846. (Note: we need the number of bytes before the image. The label indicates the image starts at record 12, so there are 11 records of 1986 bytes each before the image.)   The remaining values are in the label's IMAGE object:   OBJECT = IMAGE LINES = 20464 LINE_SAMPLES = 1986 SAMPLE_TYPE = UNSIGNED_INTEGER SAMPLE_BITS = 8 BANDS = 1 BAND_STORAGE_TYPE = BAND_SEQUENTIAL END_OBJECT = IMAGE   Now, let's open the image in ENVI using File > Open Image File. The image is listed in the Available Bands List dialog, but an error message is displayed when we try to load the band.   ENVI Retrieve Data: An error has occurred during processing Error: "READU: End of file encountered. Unit: 101, File: c:\work\me\h1183_0000_bl4.img" The result may be invalid.   Close the error dialog. Let's edit the ENVI header using File > Edit ENVI Header. Choose the image in question from "Select Input File:" and click OK. Use the PDS label values to update those in the ENVI header and click OK. Now load click "Load Band" again in the Available Bands List. The image is now displays correctly in ENVI.   Note: the ENVI Data Type is determined be a combination of PDS SAMPLE_TYPE and SAMPLE_BITS. For example, an 8-bit UNSIGNED_INTEGER PDS image is a Byte image in ENVI, whereas a 16-bit UNSIGNED_INTEGER PDS image is an Unsigned Int in ENVI.

Tom Stein

Tom Stein

×