From 2f1937802175e6913eafc9627a84173e1d9a97a3 Mon Sep 17 00:00:00 2001 From: Kris Vanneste Date: Wed, 21 Feb 2024 17:29:08 +0100 Subject: [PATCH] Do not warn if noise window ends at start of P window and updated warning message in ssp_process_traces._define_signal_and_noise_windows function. --- sourcespec/ssp_process_traces.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sourcespec/ssp_process_traces.py b/sourcespec/ssp_process_traces.py index 88654573..0314147e 100644 --- a/sourcespec/ssp_process_traces.py +++ b/sourcespec/ssp_process_traces.py @@ -325,8 +325,8 @@ def _define_signal_and_noise_windows(config, trace): t1 = max(trace.stats.starttime, p_arrival_time - noise_pre_time - config.signal_pre_time) t2 = t1 + win_length - if t2 >= (p_arrival_time - config.signal_pre_time): - logger.warning(f'{trace.id}: noise window ends after P-wave arrival') + if t2 > (p_arrival_time - config.signal_pre_time): + logger.warning(f'{trace.id}: noise window ends after P-window start') t2 = p_arrival_time - config.signal_pre_time t1 = min(t1, t2) trace.stats.arrivals['N1'] = ('N1', t1)