PDS_VERSION_ID = PDS3 RECORD_TYPE = "STREAM" OBJECT = TEXT INTERCHANGE_FORMAT = "ASCII" PUBLICATION_DATE = 2021-07-22 NOTE = "DOCUMENT/CODESAMPLES/ directory contents " END_OBJECT = TEXT END REX DOCUMENT/CODESAMPLES/ Directory Contents The REX DOCUMENT/CODESAMPLES/ directory currently contains sample code, in five programming languages (FORTRAN, BASH, C, IDL, Python), to access the binary data in the REX data products in this data set. These were developed for a Linux/Unix(tm) environment, but should be portable with minimal effort to most command-line environments (Cygwin/Windows; OSX terminal). CAVEAT ====== N.B. These samples are provided as documentation only, not as PDS-supported software as defined in the PDS Standards Reference, Version 3.8, Section 6 and Appendix Section D.3. Although these samples have successfully read and extracted data from a review version of REX data sets, they are guaranteed to work neither in any environment nor with any future versions of the data. The greatest utility of these programs is as a set of examples demonstrating various techniques to read the REX instrument data products. newrex_bash.bash newrex_c.c newrex_f.f newrex_pro.pro newrex_py.py Five versions of the same program, which extracts I&Q, Radiometry and Time Tag binary data from REX instrument data products into a flat ASCII format; the output from all five tools will be identical for Raw REX data, and will show only minor differences (+/- 0.0001) for Calibrated REX data. Refer to comments in each source file for a description of its use. The BASH (suffix .bash), C (suffix .c) and FORTRAN (suffix .f) tools need no special libraries. These three all use the filepath to a PDS label (suffix .lbl), either as a command-line argument or as an input to be read. The C (suffix .c) and FORTRAN (suffix .f) tools each require a compiler (e.g. GCC and GFORTRAN to build binary executables. See the comments regarding the 'makefile' below. The IDL (suffix .pro) and Python (suffix .py) scripts require interpreters and supporting libraries to run. The IDL (suffix .pro) script requires the IDL ASTRONOMY library (ASTRON). The Python (suffix .py) script requires the pyfits module. As of 2016 that module is generally deprecated and its functionality replaced by the astropy.io.fits module. Consistent with the Caveat above, it is up to the user to locate any libraries and/or modules and definitions of the interfaces used in order to use these scripts, because these scripts are only intended as samples and documentation. newrex_dump_rof.bash A file to extract the raw binary bytes of the Rex Output Frame (ROF) telemetry, from the Primary Data Unit of a REX instrument data product, to a flat ASCII format. Refer to the comments in this file for details. fxbreadm.pro fxbtform.pro Two IDL files from the ASTRO FITS library for IDL; modified on the development system to handle 64-bit integer data. If a recent version of the library is used, these files can probably be removed. codeinfo.txt This file.