[fixes #185] filtering of waveforms now conserved for picking

This commit is contained in:
Sebastian Wehling-Benatelli 2016-03-03 11:12:27 +01:00
parent 6108519acb
commit c2168dbef3

View File

@ -480,6 +480,15 @@ class PickDlg(QDialog):
while itrace > len(wfdata) - 1: while itrace > len(wfdata) - 1:
itrace -= 1 itrace -= 1
# copy data for plotting
data = self.getWFData().copy()
# filter data and trace on which is picked prior to determination of SNR
phase = self.selectPhase.currentText()
filteroptions = self.getFilterOptions(phase).parseFilterOptions()
data.filter(**filteroptions)
wfdata.filter(**filteroptions)
result = getSNR(wfdata, (noise_win, gap_win, signal_win), ini_pick, itrace) result = getSNR(wfdata, (noise_win, gap_win, signal_win), ini_pick, itrace)
snr = result[0] snr = result[0]
@ -488,16 +497,16 @@ class PickDlg(QDialog):
x_res = getResolutionWindow(snr) x_res = getResolutionWindow(snr)
# remove mean noise level from waveforms # remove mean noise level from waveforms
wfdata = self.getWFData().copy() for trace in data:
for trace in wfdata:
t = prepTimeAxis(trace.stats.starttime - self.getStartTime(), trace) t = prepTimeAxis(trace.stats.starttime - self.getStartTime(), trace)
inoise = getnoisewin(t, ini_pick, noise_win, gap_win) inoise = getnoisewin(t, ini_pick, noise_win, gap_win)
trace = demeanTrace(trace=trace, window=inoise) trace = demeanTrace(trace=trace, window=inoise)
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)
self.getPlotWidget().plotWFData(wfdata=wfdata, self.getPlotWidget().plotWFData(wfdata=data,
title=self.getStation() + title=self.getStation() +
' picking mode', ' picking mode',
zoomx=self.getXLims(), zoomx=self.getXLims(),