Skip to content

Commit

Permalink
Updated data acquisition script
Browse files Browse the repository at this point in the history
- Modified the behaviour of the script to include all exceptions when trying to read from an obspy-appropriate format.
- This should now fix  any issues with reading simple ASCII files
- Updated `getEvents.py` to version `3.1`
  • Loading branch information
ispingos committed Aug 27, 2020
1 parent 6531e1e commit a68b048
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions acquisition_scripts/getEvents.py
Expand Up @@ -3,9 +3,9 @@
## input parameters ##
# catalogue of events. either a QuakeML or a simple text file with the following structure:
# YYYY mm dd HH MM SS.ffff LAT_in_DD LON_in_DD MAG DEPTH_in_km
catalogue='../example/wgoc_events_example_NKUA.xml'
catalogue = '../example/wgoc_events_example_NKUA.xml'
# which networks to download. can use '*' to get all network-station combinations.
networks=['*']
networks = ['*']
# stations can be one of the following:
# - a list containing the names of the stations to download
# - a StationXML file, from which all available stations will be acquired
Expand All @@ -21,16 +21,16 @@
stations = 20. # radius in km

# comma separated STRING of channels. * for all. can use widlcards such as 'HH?,HN?'
channels="*"
channels = "*"
# comma separated STRING of SEED location codes. * for all
locations="*"
locations = "*"

## output parameters ##
# directory for saving data. the underlying structure will be based on the origin time
# and will be of the format: destination/YYYY/mm/dd/YYYY-mm-dd-HH-MM-SS/
destination='../example/data/'
destination = '../example/data/'
# either 'MSEED' or 'SAC'
output='MSEED'
output = 'MSEED'

## other parameters ##
start = -60 # seconds relative to the pick time for start time
Expand All @@ -55,8 +55,8 @@

SCRIPT_START=UTCDateTime()
# initial params
VERDATE="15/04/2019"
VERSION="3.0"
VERDATE="27/08/2020"
VERSION="3.1"
# Logging params
logging.basicConfig(
level=logging.DEBUG,
Expand Down Expand Up @@ -164,7 +164,7 @@ def makeEventFolders(events,destination):
# magnitude selection is not always easy automatically
# we use a dummy value
temp.append(line)
except TypeError: # if the file is not of QuakeML type, a simple text file will be read
except: # if the file is not of QuakeML type, a simple text file will be read
with open(catalogue,'r') as fid:
temp=fid.readlines()
# read catalogue lines into a py container and make the directories
Expand Down

0 comments on commit a68b048

Please sign in to comment.