Jump to content
PDS Geosciences Node Community

Opening Mars Odyssey GRS data in ENVI or ArcGIS


Chase

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!

Link to comment
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

Link to comment
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,

Link to comment
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

Link to comment
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.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...