From 438b2706b7eae61e0071e95f29659588cbcb42b2 Mon Sep 17 00:00:00 2001 From: Sebastianw Wehling-Benatelli Date: Tue, 22 Mar 2016 10:52:20 +0100 Subject: [PATCH] [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 --- pylot/core/loc/nll.py | 1 - pylot/core/read/data.py | 9 +++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pylot/core/loc/nll.py b/pylot/core/loc/nll.py index 36de5625..6c27ac43 100644 --- a/pylot/core/loc/nll.py +++ b/pylot/core/loc/nll.py @@ -3,7 +3,6 @@ import subprocess import os -from obspy import readEvents from pylot.core.pick.utils import writephases from pylot.core.util.utils import getPatternLine from pylot.core.util.version import get_git_version as _getVersionString diff --git a/pylot/core/read/data.py b/pylot/core/read/data.py index 459d56f0..f48edf0d 100644 --- a/pylot/core/read/data.py +++ b/pylot/core/read/data.py @@ -3,9 +3,9 @@ import os import glob -from obspy.xseed import Parser +from obspy.io.xseed import Parser 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 pylot.core.read.io import readPILOTEvent @@ -37,9 +37,10 @@ class Data(object): if isinstance(evtdata, Event): self.evtdata = evtdata elif isinstance(evtdata, dict): - cat = readPILOTEvent(**evtdata) + evt = readPILOTEvent(**evtdata) + self.evtdata = evt elif evtdata: - cat = readEvents(evtdata) + cat = read_events(evtdata) self.evtdata = cat[0] else: # create an empty Event object self.setNew()