[remove] removed Wood-Anderson peak-to-peak amplitude reading from autopick.py; newly introduced in autoPyLoT in a future commit

This commit is contained in:
Sebastian Wehling-Benatelli 2016-09-28 10:57:52 +02:00
parent c1bddd5c0b
commit ae967b3429

View File

@ -17,10 +17,8 @@ from pylot.core.pick.charfuns import CharacteristicFunction
from pylot.core.pick.charfuns import HOScf, AICcf, ARZcf, ARHcf, AR3Ccf from pylot.core.pick.charfuns import HOScf, AICcf, ARZcf, ARHcf, AR3Ccf
from pylot.core.pick.utils import checksignallength, checkZ4S, earllatepicker, \ from pylot.core.pick.utils import checksignallength, checkZ4S, earllatepicker, \
getSNR, fmpicker, checkPonsets, wadaticheck getSNR, fmpicker, checkPonsets, wadaticheck
from pylot.core.util.dataprocessing import restitute_data, read_metadata
from pylot.core.util.utils import getPatternLine from pylot.core.util.utils import getPatternLine
from pylot.core.io.data import Data from pylot.core.io.data import Data
from pylot.core.analysis.magnitude import RichterMagnitude
def autopickevent(data, param): def autopickevent(data, param):
@ -121,8 +119,6 @@ def autopickstation(wfstream, pickparam, verbose=False):
# parameter to check for spuriously picked S onset # parameter to check for spuriously picked S onset
zfac = pickparam.get('zfac') zfac = pickparam.get('zfac')
# path to inventory-, dataless- or resp-files # path to inventory-, dataless- or resp-files
invdir = pickparam.get('invdir')
invtype, inventory = read_metadata(invdir)
# initialize output # initialize output
Pweight = 4 # weight for P onset Pweight = 4 # weight for P onset
@ -565,24 +561,6 @@ def autopickstation(wfstream, pickparam, verbose=False):
# re-create stream object including both horizontal components # re-create stream object including both horizontal components
hdat = edat.copy() hdat = edat.copy()
hdat += ndat hdat += ndat
h_copy = hdat.copy()
[cordat, restflag] = restitute_data(h_copy, invtype, inventory)
# calculate WA-peak-to-peak amplitude
# using subclass WApp of superclass Magnitude
if restflag:
if Sweight < 4:
wapp = RichterMagnitude(cordat, mpickS, mpickP + sstop, iplot)
else:
# use larger window for getting peak-to-peak amplitude
# as the S pick is quite unsure
wapp = RichterMagnitude(cordat, mpickP, mpickP + sstop +
(0.5 * (mpickP + sstop)), iplot)
Ao = wapp.getwapp()
else:
print("Go on processing data without source parameter "
"determination!")
else: else:
msg = 'Bad initial (AIC) S-pick, skipping this onset!\n' \ msg = 'Bad initial (AIC) S-pick, skipping this onset!\n' \
'AIC-SNR={0}, AIC-Slope={1}counts/s\n' \ 'AIC-SNR={0}, AIC-Slope={1}counts/s\n' \
@ -602,16 +580,6 @@ def autopickstation(wfstream, pickparam, verbose=False):
# re-create stream object including both horizontal components # re-create stream object including both horizontal components
hdat = edat.copy() hdat = edat.copy()
hdat += ndat hdat += ndat
h_copy = hdat.copy()
[cordat, restflag] = restitute_data(h_copy, invtype, inventory)
if restflag is True:
# calculate WA-peak-to-peak amplitude
# using subclass WApp of superclass Magnitude
wapp = RichterMagnitude(cordat, mpickP, mpickP + sstop + (0.5 * (mpickP
+ sstop)),
iplot)
Ao = wapp.getwapp()
else: else:
print('autopickstation: No horizontal component data available or ' \ print('autopickstation: No horizontal component data available or ' \
'bad P onset, skipping S picking!') 'bad P onset, skipping S picking!')