Skip to content

Commit

Permalink
Updated data acquisition script
Browse files Browse the repository at this point in the history
- The `getEvents` script should now be better at identifying a simple catalogue file in the non-QuakeML format.
- Updated `getEvents` to version `3.2`
- This is further work on a68b048
  • Loading branch information
ispingos committed Sep 4, 2020
1 parent 7840376 commit a59b842
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions acquisition_scripts/getEvents.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@

SCRIPT_START=UTCDateTime()
# initial params
VERDATE="27/08/2020"
VERSION="3.1"
VERDATE="04/09/2020"
VERSION="3.2"
# Logging params
logging.basicConfig(
level=logging.DEBUG,
Expand Down Expand Up @@ -134,7 +134,7 @@ def makeEventFolders(events,destination):
try:
os.makedirs(fullPath)
except FileExistsError:
logging.exception("Event folder already exists?")
logging.warning("Event folder already exists!")
pathDict.update({str(event):fullPath})
return pathDict

Expand All @@ -147,6 +147,12 @@ def makeEventFolders(events,destination):
codeList=getInvStations(inv)
# read the catalogue file
try:
#-- test for quakeml
with open(catalogue, 'r') as fid:
test = fid.read()
if not 'quakeml' in test: # alternative should be a plain catalogue file, without any such strings
raise IOError('File %s is not of QuakeML format' % catalogue)
#
evs=read_events(catalogue)
# convert to text catalogue format
temp = []
Expand Down

0 comments on commit a59b842

Please sign in to comment.