#### DESCRIPTION #######################################################
########################################################################
##   Parses data on the events given in SOD .csv format and puts into ##
##  individually formatted files in a directory.                      ##
##                                                                    ##
##   LAST EDITED: Jun. 14, 2008 at 20:10 GMT by Garrett Euler         ##
##   VERSION INFO:                                                    ##
##            1.3: user can now set chans, time limits, and units     ##
##            1.2: extended window (-1 to 3 hours), 1 sps data        ##
##            1.1: cleaned up version                                 ##
##            1.0: initial version                                    ##
########################################################################

#### USAGE #############################################################
########################################################################
##  Command line input:                                               ##
##     cutcamdb.pl ev_file ev_out_dir out_data_dir db chans           ##
##                 begin_time end_time counts nproc                   ##
##                                                                    ##
##     where:                                                         ##
##        *ev_file - SOD .csv format event file                       ##
##        *ev_out_dir - output event files directory                  ##
##        *out_data_dir - output data directory for extracted data    ##
##        *db - local database to pull data from                      ##
##        *chans - channel code (eg BHZ_02 or \* or LH[ZEN]_01 ...)   ##
##        *start_time - start time of cut relative to event (sec)     ##
##        *end_time - end time of cut relative to event (sec)         ##
##        *counts - 1 = units in counts, 0 = ground units             ##
##        *nproc - number of processor threads for this task          ##
########################################################################

