[bugfix] Condition for using entire waveform (Ldiff<0) was too weak.

This commit is contained in:
Ludger Küperkoch 2019-06-19 14:41:45 +02:00
parent bca4ce1c11
commit bf20ad92da

View File

@ -543,7 +543,6 @@ class AutopickStation(object):
self.p_results.lpp = self.ztrace.stats.starttime + self.pickparams["timeerrorsP"][3]
self.p_results.epp = self.ztrace.stats.starttime - self.pickparams["timeerrorsP"][3]
self.p_results.mpp = self.ztrace.stats.starttime
self.p_results.channel = self.ztrace.stats.channel
self.p_results.network = self.ztrace.stats.network
#
@ -793,7 +792,7 @@ class AutopickStation(object):
raise PickingFailedException('autopickstation: empty trace! Return!')
Ldiff = Lwf - abs(Lc)
if Ldiff < 0 or self.pickparams['pstop'] <= self.pickparams['pstart']:
if Ldiff < self.pickparams['tlta'] or self.pickparams['pstop'] <= self.pickparams['pstart']:
msg = 'autopickstation: Cutting times are too large for actual waveform!\nUsing entire waveform instead!'
self.vprint(msg)
self.pickparams['pstart'] = 0