[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)
This commit is contained in:
Sebastian Wehling-Benatelli 2016-05-06 12:04:27 +02:00
parent fd27a43110
commit 4480854ee5

View File

@ -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)