diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index 8d6de16c..57eb21e5 100755 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -773,7 +773,7 @@ def autopickstation(wfstream, pickparam, verbose=False): plt.close() ########################################################################## # calculate "real" onset times - if mpickP is not None and epickP is not None and mpickP is not None: + if mpickP is not None and epickP is not None and lpickP is not None: lpickP = zdat[0].stats.starttime + lpickP epickP = zdat[0].stats.starttime + epickP mpickP = zdat[0].stats.starttime + mpickP @@ -784,7 +784,7 @@ def autopickstation(wfstream, pickparam, verbose=False): epickP = zdat[0].stats.starttime mpickP = zdat[0].stats.starttime - if mpickS is not None and epickS is not None and mpickS is not None: + if mpickS is not None and epickS is not None and lpickS is not None: lpickS = edat[0].stats.starttime + lpickS epickS = edat[0].stats.starttime + epickS mpickS = edat[0].stats.starttime + mpickS