Jump to content
PDS Geosciences Node Community
Chase

Opening Mars Odyssey GRS data in ENVI or ArcGIS

Recommended Posts

I'm a student and I'm just getting into ENVI and ArcGIS. I have to do projects for both and want to use the Mars Odyssey Gamma Ray Spectrometer data. Unfortunately, I haven't been able to find a way to access the data in either of the programs. I've been able to view the data that is contained using some of the software they provide and NASAview, but that's it. I'm willing to use a program other than ENVI or ArcGIS but those are the ones I'm familiar with. Any help would be greatly appreciated. Thanks!

Share this post


Link to post
Share on other sites

Chase,

I can help you better if you narrow down the problem a bit. Which of the GRS data sets do you want to use? Probably not the EDR (raw) data. The CGS data set has calibrated individual spectra, which are not very useful unless you bin them to improve the signal to noise. The SGS data set has binned data. There are higher level derived products which are tables of various parameters by latitude and longitude. What do you want to do with the data, and what have you already tried that didn't help you?

Susie Slavney

Share this post


Link to post
Share on other sites

Yea, the SGS data is what I need (I meant to specify that in my last message). I'm using the data to analyze changes in ice concentrations of the Northern Polar Ice Cap on a yearly basis. The problem is getting the data into ENVI (I have tried opening it directly in ENVI, but as expected this did not work).

 

The best approach I can think of is to use the java source code to parse the data, somehow put that into a text file, and then use IDL to feed the data into ENVI (once I figure out the storage format- I'm familiar with the BSQ, BIL, and BIP storage formats). The problem is I'm not familiar with IDL so I'm either searching for a better way or help with this process.

 

Other approaches: I've attempted to open the file in different programs (ENVI, ArcGIS, Image Viewers) and I've looked for file converters and I've attempted to use IDL with my limited programing knowledge, but the most I could accomplish was viewing the data in NASAview and Windows (command prompt).

 

If you want a specific file so that we're on the same page, let's just use a file that is quick to get to and I'll pull up the files I actually need later. sgs_01_015_030_00.dat (http://pds-geosciences.wustl.edu/ody/ody-m-grs-5-sgs-v1/odgs1_xxxx/yr01/yr01_ls015_030/)

 

Thanks,

Share this post


Link to post
Share on other sites

Chase,

I have posted an IDL script that demonstrates how to read an SGS data file. It reads as many records as you specify into an IDL array. It also writes a few selected columns of data (not the spectra) to an output text file. You can, of course, change what is written out; this is just an example of how to do it. The output is a csv (comma-separated-value) file that is easily opened in Excel.

 

The download is sgs_read.txt on the Downloads tab of this forum. Rename it to sgs_read.pro to use in IDL.

 

To run this script in IDL, use the command

 

sgs_read, "sgs_01_015_030_00.dat", my_sgs, 72

 

This will read all 72 records in the data file. The spectra go into the IDL variable my_sgs[*].gamma_spectrum. You can then plot one of them with a command like

 

plot, my_sgs[70].gamma_spectrum

 

Good luck,

Susie

Share this post


Link to post
Share on other sites

Alright, so I got the script working and brought everything I needed up in ENVI. What would it take to make changes to the program to read the AND and AHD data?

 

Thanks,

Chase

Share this post


Link to post
Share on other sites

The structure of the SGS record defined in the script is based on the format file summed_gamma_spectra_cols.fmt in the LABEL directory of the SGS archive. By comparing the script and the format file you can figure out how to specify 4-byte real numbers, 8-byte real numbers, 2-byte unsigned integers and character strings in IDL. To modify the script to read AND and AHD files, you'll need to create similar structures based on the AND and AHD format files, in avg_neutron_data_cols.fmt and avg_hend_data_cols.fmt.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...