#### DESCRIPTION #######################################################
########################################################################
##   Seismometers are instruments that respond to earth motion. That  ##
##  response is unequal to the earth motion and is dependent on the   ##
##  amplitude and period of the earth's motion.  This is known as the ##
##  instrument response.                                              ##
##                                                                    ##
##  You will need to indicate which type of response file you are     ##
##  using (pz or resp only).  Requires 'sac' and maybe 'evalresp'.    ##
##                                                                    ##
##  Next Version: Get EVALRESP/FAPFILE option working - sniffing out  ##
##                a bug in sac (no error and no response removed???)  ##
##                                                                    ##
##   LAST EDITED: Nov. 26, 2007 at  8:10am by Garrett Euler           ##
##   VERSION INFO:                                                    ##
##            2.6: split sac macro building to allow for including    ##
##                 station specific fixes                             ##
##            2.5: speedup for equal input and fail directories       ##
##            2.4: whitening option added                             ##
##            2.3: threading support added to optimize efficiency     ##
##            2.2: verify new file created check, adjustible ground   ##
##                 units and freqlimits (with sac defaults preset)    ##
##            2.1: no tables - accesses headers                       ##
##            2.0: complete rewrite - modularized and stuff           ##
##            1.4: 'production on' added to sac macros so SAC exits   ##
##                 on an error in instrument removal                  ##
##            1.3: new option 'fap' - uses external evalresp to make  ##
##                 freq-amp-phase files that are then put into sac    ##
##            1.2: deals with blank pz files                          ##
##            1.1: streamlined and added this help.                   ##
##            1.0: initial version                                    ##
########################################################################

#### USAGE #############################################################
########################################################################
##  Command line input:                                               ##
##     rinst.pl in_data_dir new_data_dir response_type response_dir   ##
##               fail_dir nproc [units] [whiten]                      ##
##               [low_stop] [low_pass] [high_pass] [high_stop]        ##
##     where:                                                         ##
##        *in_data_dir - input data directory                         ##
##        *new_data_dir - output data directory                       ##
##        *response_type - response file type used (pz,resp)          ##
##        *response_dir - path to the directory containing the        ##
##           response files                                           ##
##        *fail_dir - output data directory for failed responses      ##
##        *nproc - number of processor threads for this task          ##
##        *units - output ground units - acc, vel, dis (default dis)  ##
##        *whiten - prewhitening argument - on, off, or integer order ##
##           exactly like the sac 'whiten' options (default is off)   ##
##           -- integer order must be from 1 to 12                    ##
##        *low_stop, low_pass, high_pass, high_stop - frequency limit ##
##           corners that indicate stop and pass bands for applying   ##
##           the instrument response removal (defaults match SAC)     ##
########################################################################

