get_average_signal.py


USAGE

get_average_signal.py start date input file

where start date is the date with 0.0 relative gravity; the start of the surveys. It is formatted as "YYYY/MM/DD". input file is the name of the data file to be processed. This is normally "data.out" after a run of generate_table, which finishes by producing a file of relative gravity in "data.out".

OVERVIEW

This program takes the data file and the start date, and proceeds to compute an average signal for each date in the data file. It first averages all readings of a particular station (using the name) for each date. It then tests to insure that there is a reading for each station for each date. If not, it interpolates a date using the nearest dates it can find that straddle the missing date. This is a simple linear interpolation.

Finally, the program averages all readings for each date and prints the results to standard out (the screen). The output format is the same format as is used by generate_table: "date id G S". However, "id" is always set to ASIG.

All averaging is done as a weighted average, using the s.d. of the readings as the weights (actually, S^-2).