#### DESCRIPTION #######################################################
########################################################################
##   Seismometers often deviate from a centered position as the       ##
##  instrumentation behaves inelastically, local temperatures         ##
##  fluctuate, underlying ground or pier settles, etc.  This can be   ##
##  remedied by detrending a seismogram (essentially performing a     ##
##  very-low corner highpass filter),  and finally tapering to remove ##
##  the potential for edge effects caused by truncation of the data   ##
##  stream.                                                           ##
##                                                                    ##
##  WARNING: The taper is not meant to be near phase arrivals as it   ##
##  modifies the frequency content.                                   ##
##                                                                    ##
##   LAST EDITED: Jun. 14, 2008 at 18:55 GMT by Garrett Euler         ##
##   VERSION INFO:                                                    ##
##            2.4: rtr; taper - simple again (removed rglitches)      ##
##            2.3: changed rglitches to just use default settings     ##
##            2.2: - rglitches added to clean up nasty                ##
##            2.1: - added ability to set grouping size as SAC has a  ##
##                 limit of 1000 files - smaller numbers limit impact ##
##                 of a failure while larger numbers are faster       ##
##                 - added verification that output files are made to ##
##                 idenitify problems rapidly                         ##
##                 - threading support added to optimize efficiency   ##
##            2.0: - error checks with exit codes                     ##
##                 - removed custom taper (not really that useful)    ##
##                 - no timing info necessary                         ##
##                 - assumes larger read limit of SAC 101.0           ##
##            1.2: - removed filtering (bad idea)                     ##
##                 - removed dependance on 'saclhdr' (slow)           ##
##                 - now uses timing list file,                       ##
##                 - added presorting and checks                      ##
##            1.1: - streamlined and added this help.                 ##
##            1.0: - initial version                                  ##
########################################################################

#### USAGE #############################################################
########################################################################
##  Command line input:                                               ##
##     rdrift.pl in_data_dir new_data_dir nproc group                 ##
##                                                                    ##
##     where:                                                         ##
##        *in_data_dir - input data directory                         ##
##        *new_data_dir - output data directory                       ##
##        *nproc - number of processor threads for this task          ##
##        *group - max number of files to process as a group, must be ##
##                  less than 1000                                    ##
########################################################################

