From b7d3568498409d7e1dc0548f159248326deaa57a Mon Sep 17 00:00:00 2001 From: Darius Arnold Date: Wed, 8 Aug 2018 21:45:17 +0200 Subject: [PATCH] [bugfix] Taupy used even if disabled when p start time > 0 If Taupy was disabled, but pstart was larger than zero, the and would lead to the function that modifies starttimes not exiting. This resulted in taupy being used even though it was disabled when the p starttime was above 0. --- pylot/core/pick/autopick.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pylot/core/pick/autopick.py b/pylot/core/pick/autopick.py index 4b820e37..2e466cf9 100644 --- a/pylot/core/pick/autopick.py +++ b/pylot/core/pick/autopick.py @@ -514,10 +514,11 @@ class AutopickStation(object): ' origin time using TauPy'.format(estFirstP, estFirstS)) return estFirstP, estFirstS - if (self.p_params.use_taup is False or not self.origin) and self.p_params.pstart < 0: + if self.p_params.use_taup is False or not self.origin or not self.metadata: # correct user mistake where a relative cuttime is selected (pstart < 0) but use of taupy is disabled/ has # not the required parameters - self.p_params.pstart = 0 + if self.p_params.pstart < 0: + self.p_params.pstart = 0 return print('autopickstation: use_taup flag active.')