rearranged filter waveform data method to match signature of the parseFilterOptions method of the FilterOptions object which will be used to hold filter information which can be defined by the project leader in advance

This commit is contained in:
sebastianw committed 2015-06-23 13:15:39 +02:00
1 parent f1c7f00193
commit 2393b88f05
1 file changed
+17 -4
+17 -4
View File
@@ -554,12 +554,25 @@ class PickDlg(QDialog):
ax.figure.canvas.draw()
def filterWFData(self):
ax = self.getPlotWidget().axes
ylims = ax.get_ylim()
xlims = ax.get_xlim()
def filterWFData(self, phase):
self.updateCurrentLimits()
data = self.getWFData().copy()
old_title = self.getPlotWidget().getAxes().get_title()
title = None
if self.filterAction.isChecked():
filteroptions = self.getFilterOptions(phase).parseFilterOptions()
data.filter(**filteroptions)
if old_title.endswith(')'):
title = old_title[:-1] + ', filtered)'
else:
title = old_title + ' (filtered)'
if not title:
title = old_title
self.getPlotWidget().plotWFData(wfdata=data, title=title,
zoomx=self.getXLims(),
zoomy=self.getYLims())
self.setPlotLabels()
self.draw()
def setPlotLabels(self):