ECOM 721 Software Page

Descriptions of Software

Quick Click Index

Purpose
Disclaimer
Instrument
Data
Software
Compiling
Downloading
the Software
List of
Software


Purpose:

This document is intended to shed some light on the software that exists to bin the ECOM spectrograph raw data and reduce it into physical units (Rayleighs).

Disclaimer:

This code has been worked and reworked, so it is by no means user friendly nor is it guaranteed to be bug free. A full description of the data records is given
here, so one can start from the raw data if these programs are too limited, cumbersome, or impossible to comprehend. In any case, this code can help in understanding the structure of the data.

Instrument:

A full description of the spectrograph and the P78-1 spacecraft can be found on the web site. The critical aspects of the instrument and mission profile in terms of data reduction are:

Data:

A detailed description of the data can be found
here. Briefly, the data is stored in files on CDROMs. Each file contains up to three orbits of data. The filename takes the form:
<'gggg####'>
where gggg is the ground station, e.g. hula, pogo, guam, etc., and #### is the starting orbit revolution number in the mission (a number between 0000 and 1200).

The data is stored as records of individual spectra along with the aspect and spacecraft location information (in many different coordinate systems).


Software:

There are two "flavors" of programs which operate in sequence to reduce the data. The first type of program is the data reading and interpretation programs (drip) and are descendants of the original data analysis code written in Fortran and IDL. (They were designed to read 1/4 in tapes. The records have since been archived into files on CDROMS such that each file contains the contents of one tape, and all of the current programs have been modified such that they can operate on the CDROM files.) These programs (all of which have the name "drip" somewhere in the filename) bin and reduce the raw spectrum into physically meaningful data for various look directions. The output is another file which uses takes the form <'gggg####'>.dat, .one, or .two. In order to change the binning of the data, one must modify or rewrite these programs.

The second flavor of programs reads the output files and plots the data. These programs are written primarily in the Interactive Data Language (IDL) and take the form zap.pro. Note that each program was written for a specific output, so that using one form of zap with the output of a particular drip program may not work.

The Fortran programs have a modest amount of comments in them. However, the IDL programs were written as one shots and are virtually comment free. It is suggested that one write their own programs to deal with the data.


Compiling:

WARNING!!!
All Fortran software was written to run on a Sun Sparc station. Some work will be required in order to compile these programs and make them run on other types of machines. (The usual problems of big endian vs. little endian comes to mind.)

The Fortran programs come with a makefile of the form mk<'program name'>. They are listed below. The makefiles use f77 to compile these programs. Note that one must also download other necessary subroutines and functions for makefiles to work. Use the command "make -f <'makefile name'>".

List of makefiles for compiling FORTRAN programs:

Also, there are a number of C functions that get linked in (ibmtoieee.c, cint.c, and error.c). These are compiled using cc or gcc. Their purpose mainly is to convert certain formats from the old programs (written for a Perkin-Elmer) to the Sun.

The IDL programs require the IDL package, but should be completely portable (except for the byte ordering). Compile these programs using the command ".run <'filename'>".

A complete list of the programs and their descriptions is given below.


Downloading the Software:

The downloadable files are the source code for the software necessary for analysis of the available data. Download all the files along with the following data files:

calibration data for the spectrograph

grat.### - where ### is a grating step number


List of software:

Processing Routines:
FORTRAN Programs
dripd.fReads data from disk file and crunches it for plotting.
onedripd.fModification of dripd - looks in both azimuth directions.
twodripd.fModification of onedripd - time and zenith angle
bins are variable (the most versatile of the programs).
Subroutines & Functions
subsd.fSubroutines for dripd, etc.
cint.cconvert integer to 2s complement.
error.cerror message routine
ibmtoieee.cconversion of floating points from ibm format to ieee
io.creadrec function (easier to write in C)
readdta.creaddta, readispec functions (again easier to write in C)

IDL Programs
drip0.proCombination of dripd and twodripd.
drip.proCombination of onedripd and twodripd.
Subroutines & Functions
ibmtoieee2.soconverts floating points from ibm format to ieee


Plotting Routines:

Programs & Inputs
zap0.proPlots single line intensities as a function of zenith angle for drip0.pro.
datzapf.proSame as zap0 but for dripd.f.
errbar.proGenerates error bars for zap0 and datzapf.

zap.proPlots Intensity vs. Zenith Angle vs. Universal Time for drip.pro.
onezapf.proSame as zap but for onedripd.f.
twozapf.proSame as zap except for twodripd.f.
anomaly.datFile containing coordinates for the South Atlantic Anomaly.
geolonlat.datFile with geographic longitudes and latitudes.
1979File with Ap and F10.7 indices for 1979.
aurora.proPlots Aurorae Borealis & Australis.
azimuth.proPlots look direction vs. universal time.
magnet.proPlots a mercator map with geomagnetic coordinates.
map.proPlots satellite path for start and end time of data file.
overplot.proGenerates color intensity plot.
overplotbar.proColor key.
transform.proConverts from geographic coordinates to geomagnetic coordinates .
weekapf10.proPlots Ap and F10.7 index for five days before and five days after the tape date.


Last Updated May 29, 1998 by Janine Lyn