From de5c65bc1d62c7492fbe7a69260f4e45286dfc94 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludger=20K=C3=BCperkoch?= Date: Tue, 1 Sep 2015 14:25:48 +0200 Subject: [PATCH] Wood-Anderson peak-to-peak amplitude is now calculated even if S weight is 4. At least P pick must be confident, if S weight > 3 a larger window for getting maximum peak-to-peak amplitude is used. --- pylot/core/pick/autopick.py | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index b8532638..89726764 100755 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -507,20 +507,26 @@ def autopickstation(wfstream, pickparam): print 'autopickstation: S-weight: %d, SNR: %f, SNR[dB]: %f' % ( Sweight, SNRS, SNRSdB) ################################################################## + # get Wood-Anderson peak-to-peak amplitude + print "################################################" + # initialize Data object + data = Data() + # re-create stream object including both horizontal components + hdat = edat.copy() + hdat += ndat + h_copy = hdat.copy() + cordat = data.restituteWFData(invdir, h_copy) + # calculate WA-peak-to-peak amplitude + # using subclass WApp of superclass Magnitude if Sweight < 4: - # get Wood-Anderson peak-to-peak amplitude - print "################################################" - # initialize Data object - data = Data() - # re-create stream object including both horizontal components - hdat = edat.copy() - hdat += ndat - h_copy = hdat.copy() - cordat = data.restituteWFData(invdir, h_copy) - # calculate WA-peak-to-peak amplitude - # using subclass WApp of superclass Magnitude wapp = WApp(cordat, mpickS, mpickP + sstop, iplot) Ao = wapp.getwapp() + else: + # use larger window for getting peak-to-peak amplitude + # as the S pick is quite unsure + wapp = WApp(cordat, mpickP, mpickP + sstop + \ + (0.5 * (mpickP + sstop)), iplot) + Ao = wapp.getwapp() else: print 'Bad initial (AIC) S-pick, skipping this onset!' @@ -541,7 +547,8 @@ def autopickstation(wfstream, pickparam): cordat = data.restituteWFData(invdir, h_copy) # calculate WA-peak-to-peak amplitude # using subclass WApp of superclass Magnitude - wapp = WApp(cordat, mpickP, mpickP + sstop, iplot) + wapp = WApp(cordat, mpickP, mpickP + sstop + (0.5 * (mpickP \ + + sstop)), iplot) Ao = wapp.getwapp() else: