From a95a33abc9a6ef67b3d8b41e702f4f28cd118ecd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Tue, 20 Sep 2016 15:26:55 +0200 Subject: [PATCH] Implemented read_metadata.py in calcsourcespec.py (was this intended?). --- pylot/core/analysis/magnitude.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pylot/core/analysis/magnitude.py b/pylot/core/analysis/magnitude.py index ad54b138..ca7b7216 100644 --- a/pylot/core/analysis/magnitude.py +++ b/pylot/core/analysis/magnitude.py @@ -6,6 +6,7 @@ Created autumn/winter 2015. :author: Ludger Küperkoch / MAGS2 EP3 working group """ +import pdb import matplotlib.pyplot as plt import numpy as np from obspy.core import Stream, UTCDateTime @@ -14,7 +15,7 @@ from pylot.core.util.utils import getPatternLine from scipy.optimize import curve_fit from scipy import integrate, signal from pylot.core.io.data import Data -from pylot.core.util.dataprocessing import restitute_data +from pylot.core.util.dataprocessing import restitute_data, read_metadata from pylot.core.util.utils import common_range @@ -306,7 +307,7 @@ def calcMoMw(wfstream, w0, rho, vp, delta, inv): return Mo, Mw -def calcsourcespec(wfstream, onset, metadata, vp, delta, azimuth, incidence, +def calcsourcespec(wfstream, onset, invdir, vp, delta, azimuth, incidence, qp, iplot): ''' Subfunction to calculate the source spectrum and to derive from that the plateau @@ -321,7 +322,7 @@ def calcsourcespec(wfstream, onset, metadata, vp, delta, azimuth, incidence, :param: onset, P-phase onset time :type: float - :param: inventory, path/name of inventory or dataless-SEED file + :param: invdir, path to inventory or dataless-SEED file :type: string :param: vp, Vp-wave velocity @@ -354,7 +355,7 @@ def calcsourcespec(wfstream, onset, metadata, vp, delta, azimuth, incidence, data = Data() wf_copy = wfstream.copy() - invtype, inventory = metadata + invtype, inventory = read_metadata(invdir) [cordat, restflag] = restitute_data(wf_copy, invtype, inventory) if restflag is True: