From 4480854ee5edd8cf32caa438ec5d3f99c75ec6b9 Mon Sep 17 00:00:00 2001 From: Sebastianw Wehling-Benatelli Date: Fri, 6 May 2016 12:04:27 +0200 Subject: [PATCH] [workaround] set minimum difference of mpp with lpp and epp this workaround elevates the difference between the uncertainty-picks and the mpp to a minimum value of three samples (needed for a reasonable pdf represetation of the pick) --- pylot/core/io/phases.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pylot/core/io/phases.py b/pylot/core/io/phases.py index 4604576a..13ad3eeb 100644 --- a/pylot/core/io/phases.py +++ b/pylot/core/io/phases.py @@ -310,6 +310,11 @@ def reassess_pilot_event(root_dir, event_id, fn_param=None): ) epp = stime + epp lpp = stime + lpp + min_diff = 3 * st[0].stats.delta + if lpp - mpp < min_diff: + lpp = mpp + min_diff + if mpp - epp < min_diff: + epp = mpp - min_diff picks_dict[station][phase] = dict(epp=epp, mpp=mpp, lpp=lpp, spe=spe) # create Event object for export evt = ope.Event(resource_id=event_id)