THE ZEN OF MICROGRAV
--------------------
This document is a ridiculously brief theory of operation for the
micrograv software package. See the more extensive documentation
available for actually useful information.  The package is designed to
allow for analysis of repeated high-precision gravity data taken with a
CG-3M or Aliod-equipped gravimeter.  Extension to data from other meters
should be relatively straight-forward (see cg3file.py, aliodfile.py
for examples).

PACKAGE FLOW
------------
STEP						PROGRAM(S)
----						----------
Download data					download.c

Check data for gross errors			viewdata.py
						aliodview.py

Create station parameter file			make_parm_file.py
						make_position_file.py

Analyse the data				reduce.py

Plot changes, etc.				*whatever you like*


DOWNLOADING DATA
----------------
"download.c" (in download/) is a small C program to download the CG-3M.
Since the CG-3M spews out the data without any handshaking or commands,
the program is basically a serial port transcriber.  This code is
written for a unix-like serial port interface, so making it work under
Windows or Mac (except OS X?) is probably difficult.

To run under OS X - install drivers to create /dev/tty-something that
is the serial port, and then use download as under Unix.  The programs
do NOT use the IOKit!

Aliod files can also be downloaded - check the baud rate settings, and
use GravLog on the palmtop to upload the collected data.  Note that
since there is no end-of-file indication from GravLog, you have to stop
the download with CTRL-C; download.c should be flushing data to disk
with every record, so there should not be any data loss due to the
break.

DATA CHECK
----------
This should be done in the field, after downloading the data.
"viewdata.py" will break apart a data file by station id and plot the
data in a window.  This allows for a simple visual inspection of the
data to see if there are any large errors.  Bad stations can then be
repeated, ignored, etc.

"aliodview.py" does the same thing, but for Aliod-meter data files; it
requires a meter information file (calibration table, etc.)!

STATION PARAMETER FILES
-----------------------
A station parameter file holds all the information necessary for
reduce.py to map unique station ids to benchmark names, compute elevation
change and other corrections, and determine which stations are repeats
of previous stations.  These files are critical, and they should be
prepared with care.

Due to the large size of the files for most campaigns, the utility
program "make_parm_file.py" is preferred for creating parameter files.
This program takes easily generated files and combines them into the
parameter file.

make_parm_file.py takes 2 or 3 input arguments:
  id<->name file	which maps station ids to benchmark names
  position file		which holds lat/lon/Z/dZ info for benchmark
			names
  skip file		optional file with benchmark names or stations
			ids that should be skipped in processing
The program assumes that all station ids that map to a single name are
repeats, and it will build the repeat list in this manner.  This means
that all benchmark names need a consistent spelling, and case is
important.


