add save data method
This commit is contained in:
@@ -7,6 +7,7 @@ from obspy.core import (read, Stream)
|
||||
from obspy import readEvents
|
||||
from obspy.core.event import (Event, Catalog)
|
||||
from pylot.core.util import fnConstructor
|
||||
from pylot.core.util.errors import FormatError
|
||||
|
||||
|
||||
class Data(object):
|
||||
@@ -71,7 +72,8 @@ class Data(object):
|
||||
from pylot.core.util.defaults import OUTPUTFORMATS
|
||||
|
||||
if evtformat.strip() not in OUTPUTFORMATS.values():
|
||||
evtformat = OUTPUTFORMATS.values()[0]
|
||||
errmsg = 'selected format {0} not available'.format(evtformat)
|
||||
raise FormatError(errmsg)
|
||||
|
||||
if fnout is None:
|
||||
ID = self.evtdata.getEventID()
|
||||
|
||||
@@ -8,3 +8,6 @@ Created on Thu Mar 20 09:47:04 2014
|
||||
|
||||
class OptionsError(Exception):
|
||||
pass
|
||||
|
||||
class FormatError(Exception):
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user