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()
|
evtformat = evtformat.upper().strip()
|
||||||
|
|
||||||
# export event to QuakeML or JSON via ObsPy
|
# establish catalog object (event object has no write method)
|
||||||
if evtformat in 'QUAKEML' or 'JSON':
|
cat = Catalog()
|
||||||
cat = Catalog()
|
cat.append(self.event)
|
||||||
cat.append(self.event)
|
# try exporting event via ObsPy
|
||||||
|
try:
|
||||||
cat.write(fnout + evtformat.lower(), format=evtformat)
|
cat.write(fnout + evtformat.lower(), format=evtformat)
|
||||||
|
except KeyError, e:
|
||||||
# export event to VelEst format
|
raise KeyError('''{0} export format
|
||||||
if evtformat in 'VELEST':
|
not implemented: {1}'''.format(evtformat, e))
|
||||||
'''
|
|
||||||
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
|
|
||||||
|
|
||||||
def plotData(self, widget):
|
def plotData(self, widget):
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user