[edit] removed calls to names marked as deprecated
with the last update of obspy some modules and functions names will be removed in future releases and consequently have been marked as deprecated; PyLoT now uses the desired names
This commit is contained in:
parent
cad6ed2274
commit
438b2706b7
@ -3,7 +3,6 @@
|
|||||||
|
|
||||||
import subprocess
|
import subprocess
|
||||||
import os
|
import os
|
||||||
from obspy import readEvents
|
|
||||||
from pylot.core.pick.utils import writephases
|
from pylot.core.pick.utils import writephases
|
||||||
from pylot.core.util.utils import getPatternLine
|
from pylot.core.util.utils import getPatternLine
|
||||||
from pylot.core.util.version import get_git_version as _getVersionString
|
from pylot.core.util.version import get_git_version as _getVersionString
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
import os
|
import os
|
||||||
import glob
|
import glob
|
||||||
from obspy.xseed import Parser
|
from obspy.io.xseed import Parser
|
||||||
from obspy.core import read, Stream, UTCDateTime
|
from obspy.core import read, Stream, UTCDateTime
|
||||||
from obspy import readEvents, read_inventory
|
from obspy import read_events, read_inventory
|
||||||
from obspy.core.event import Event, ResourceIdentifier, Pick, WaveformStreamID
|
from obspy.core.event import Event, ResourceIdentifier, Pick, WaveformStreamID
|
||||||
|
|
||||||
from pylot.core.read.io import readPILOTEvent
|
from pylot.core.read.io import readPILOTEvent
|
||||||
@ -37,9 +37,10 @@ class Data(object):
|
|||||||
if isinstance(evtdata, Event):
|
if isinstance(evtdata, Event):
|
||||||
self.evtdata = evtdata
|
self.evtdata = evtdata
|
||||||
elif isinstance(evtdata, dict):
|
elif isinstance(evtdata, dict):
|
||||||
cat = readPILOTEvent(**evtdata)
|
evt = readPILOTEvent(**evtdata)
|
||||||
|
self.evtdata = evt
|
||||||
elif evtdata:
|
elif evtdata:
|
||||||
cat = readEvents(evtdata)
|
cat = read_events(evtdata)
|
||||||
self.evtdata = cat[0]
|
self.evtdata = cat[0]
|
||||||
else: # create an empty Event object
|
else: # create an empty Event object
|
||||||
self.setNew()
|
self.setNew()
|
||||||
|
Loading…
Reference in New Issue
Block a user