substract the mean of the waveform data within the noise window prior to picking

This commit is contained in:
Sebastian Wehling-Benatelli 2015-06-23 13:24:47 +02:00
parent dec3e733a2
commit 03219e69d6

View File

@ -433,9 +433,15 @@ class PickDlg(QDialog):
x_res = res_wins['HRW'] x_res = res_wins['HRW']
x_res /= 2 x_res /= 2
zoomx = [ini_pick - x_res, ini_pick + x_res] # demean data before plotting
zoomy = [-noiselevel * 1.5, noiselevel * 1.5] data = self.getWFData().copy()
self.getPlotWidget().plotWFData(wfdata=wfdata, 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.setXLims([ini_pick - x_res, ini_pick + x_res])
self.setYLims(np.array([-noiselevel * 2.5, noiselevel * 2.5]) + self.setYLims(np.array([-noiselevel * 2.5, noiselevel * 2.5]) +
trace_number) trace_number)