|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES | ||||||||||
See:
Description
| Packages | |
| grs.pds | |
| grs.pds.ahd | |
| grs.pds.and | |
| grs.pds.cgs | |
| grs.pds.dhd | |
| grs.pds.dnd | |
| grs.pds.edr | |
| grs.pds.sgs | |
| grs.spice | |
Describes how to obtain and use the GRS code, a library of JavaTM classes (with source code) that may be used to parse the data files in GRS EDR, CGS, DND, and SGS records.
A Java 2 Runtime Environment (JRE) of version 1.3 or higher is required to use the EDR code. A JRE may be obtained from Sun Microsystems, Inc., or from other vendors.
The GRS code is distributed with the GRS PDS Archives available from NASA's Planetary Data System. Source code and binary classes are located within a Java Archive (JAR) named grs_code.zip in the software directory. To extract source code from the jar, use a unzip utility or the jar utility distributed with a Java 2 Software Development Kit (SDK).
The GRS code is designed to be used as a software library. In other words, it exposes an API (Application Programming Interface) that may be used by developers to build applications that parse and extract information from data files.
Alternately, the source code my be used as a guide to designing applications in other languages that parse GRS data files.
For each type of record file in a GRS PDS archive, there is a corresponding class. The following table lists the correspondence:
| Record Type | Class File |
|---|---|
| CORRECTED_GAMMA_SPECTRA | grs.pds.cgs.CorrectedGammaSpectraRecord |
| DERIVED_NEUTRON_DATA | grs.pds.dnd.NsDerivedRecord |
| GAMMA_SPECTRA | grs.pds.edr.GammaEdrRecord |
| NEUTRON_SPECTRA | grs.pds.edr.NsEdrRecord |
| HEND_SPECTRA | grs.pds.edr.HendEdrRecord |
| PULSER_SPECTRA | grs.pds.edr.PulserEdrRecord |
| PROFILE_DATA | grs.pds.edr.ProfileEdrRecord |
| COMMAND_LIST | grs.pds.edr.CmdEdrRecord |
| MESSAGE_LOG | grs.pds.edr.MsgEdrRecord |
| ENG_DATA | grs.pds.edr.EngEdrRecord |
| CHAN_DATA | grs.pds.edr.ChanEdrRecord |
| E_KERNEL_NOTES | grs.pds.edr.EkEdrRecord |
| E_KERNEL_PEF | grs.pds.edr.PefEdrRecord |
| SUMMED_GAMMA_SPECTRA | grs.pds.sgs.SummedGammaSpectraRecord |
Each class includes a java.io.DataInputStream constructor. So, the basic usage would be to:
A sample application is provided that converts EDR, CGS, or SGS files to Comma-Seperated Value (CSV) files.
Usage: java -jar grs_code.zip <path-to-data-file>
Please note that it does not include all columns in the output. In particular, the spectra data are not output to CSV. To access this data, please use the API as described above.
|
|||||||||||
| PREV NEXT | FRAMES NO FRAMES | ||||||||||