From 7e76bf75773912f6838023e4db57bf33bc8dadeb Mon Sep 17 00:00:00 2001 From: Sebastianw Wehling-Benatelli Date: Tue, 20 Sep 2016 09:57:09 +0200 Subject: [PATCH] [change] make use of new metadata reading utility function to improve performance --- pylot/core/pick/autopick.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index da496bdf..3b42eb1a 100755 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -17,7 +17,7 @@ from pylot.core.pick.charfuns import CharacteristicFunction from pylot.core.pick.charfuns import HOScf, AICcf, ARZcf, ARHcf, AR3Ccf from pylot.core.pick.utils import checksignallength, checkZ4S, earllatepicker, \ getSNR, fmpicker, checkPonsets, wadaticheck -from pylot.core.util.dataprocessing import restitute_data +from pylot.core.util.dataprocessing import restitute_data, read_metadata from pylot.core.util.utils import getPatternLine from pylot.core.io.data import Data from pylot.core.analysis.magnitude import WApp @@ -122,6 +122,7 @@ def autopickstation(wfstream, pickparam, verbose=False): zfac = pickparam.get('zfac') # path to inventory-, dataless- or resp-files invdir = pickparam.get('invdir') + invtype, inventory = read_metadata(invdir) # initialize output Pweight = 4 # weight for P onset @@ -565,7 +566,7 @@ def autopickstation(wfstream, pickparam, verbose=False): hdat = edat.copy() hdat += ndat h_copy = hdat.copy() - [cordat, restflag] = restitute_data(h_copy, invdir) + [cordat, restflag] = restitute_data(h_copy, invtype, inventory) # calculate WA-peak-to-peak amplitude # using subclass WApp of superclass Magnitude if restflag: @@ -602,7 +603,7 @@ def autopickstation(wfstream, pickparam, verbose=False): hdat = edat.copy() hdat += ndat h_copy = hdat.copy() - [cordat, restflag] = restitute_data(h_copy, invdir) + [cordat, restflag] = restitute_data(h_copy, invtype, inventory) if restflag == 1: # calculate WA-peak-to-peak amplitude # using subclass WApp of superclass Magnitude