exporting is much easier using obspy routines
This commit is contained in:
parent
7da6b57ed1
commit
0e8c5a7e48
@ -55,21 +55,15 @@ class Data(object):
|
||||
|
||||
evtformat = evtformat.upper().strip()
|
||||
|
||||
# export event to QuakeML or JSON via ObsPy
|
||||
if evtformat in 'QUAKEML' or 'JSON':
|
||||
# establish catalog object (event object has no write method)
|
||||
cat = Catalog()
|
||||
cat.append(self.event)
|
||||
# try exporting event via ObsPy
|
||||
try:
|
||||
cat.write(fnout + evtformat.lower(), format=evtformat)
|
||||
|
||||
# export event to VelEst format
|
||||
if evtformat in 'VELEST':
|
||||
'''
|
||||
Test whether the station code is longer than 4 digits.
|
||||
If that is the case a warning should be displayed explaining that
|
||||
VelEst can only handle 4 digit stationcodes. Thus, the leading too
|
||||
much digits will be skipped, e.g. "STS12" becomes "TS12"
|
||||
'''
|
||||
pass
|
||||
except KeyError, e:
|
||||
raise KeyError('''{0} export format
|
||||
not implemented: {1}'''.format(evtformat, e))
|
||||
|
||||
def plotData(self, widget):
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user