From 03219e69d6a05e91c5f02b5d014f241a6e2614e0 Mon Sep 17 00:00:00 2001 From: Sebastian Wehling-Benatelli Date: Tue, 23 Jun 2015 13:24:47 +0200 Subject: [PATCH] substract the mean of the waveform data within the noise window prior to picking --- pylot/core/util/widgets.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 0ff972f0..622090b9 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -433,9 +433,15 @@ class PickDlg(QDialog): x_res = res_wins['HRW'] x_res /= 2 - zoomx = [ini_pick - x_res, ini_pick + x_res] - zoomy = [-noiselevel * 1.5, noiselevel * 1.5] - self.getPlotWidget().plotWFData(wfdata=wfdata, + # demean data before plotting + data = self.getWFData().copy() + starttime = getGlobalTimes(data)[0] + for tr in data: + stime = tr.stats.starttime - starttime + t = prepTimeAxis(stime, tr) + inoise = getnoisewin(t, ini_pick, noise_win, gap_win) + tr.data -= tr.data[inoise].mean() + self.setXLims([ini_pick - x_res, ini_pick + x_res]) self.setYLims(np.array([-noiselevel * 2.5, noiselevel * 2.5]) + trace_number)