[add] filtering in pickDlg will not be done by default anymore, changes in pushing filter in main traces window, still WIP (not going back to original wf after first filtering?)

This commit is contained in:
Marcel Paffrath 2017-07-11 16:22:22 +02:00
parent 1d9e52f577
commit 43116ec2c6
2 changed files with 10 additions and 4 deletions

View File

@ -1539,7 +1539,7 @@ class MainWindow(QMainWindow):
def filterWaveformData(self): def filterWaveformData(self):
if self.get_data(): if self.get_data():
if self.getFilterOptions() and self.filterAction.isChecked(): if self.getFilterOptions() and self.filterAction.isChecked():
kwargs = self.getFilterOptions()['P'].parseFilterOptions() kwargs = self.getFilterOptions()[self.getSeismicPhase()].parseFilterOptions()
self.pushFilterWF(kwargs) self.pushFilterWF(kwargs)
elif self.filterAction.isChecked(): elif self.filterAction.isChecked():
self.adjustFilterOptions() self.adjustFilterOptions()
@ -1557,7 +1557,7 @@ class MainWindow(QMainWindow):
filteroptions = self.filterDlg.getFilterOptions() filteroptions = self.filterDlg.getFilterOptions()
self.setFilterOptions(filteroptions) self.setFilterOptions(filteroptions)
if self.filterAction.isChecked(): if self.filterAction.isChecked():
kwargs = self.getFilterOptions().parseFilterOptions() kwargs = self.getFilterOptions()[self.getSeismicPhase()].parseFilterOptions()
self.pushFilterWF(kwargs) self.pushFilterWF(kwargs)
self.plotWaveformDataThread() self.plotWaveformDataThread()

View File

@ -752,6 +752,9 @@ class PickDlg(QDialog):
else: else:
self.autopicks = {} self.autopicks = {}
self._init_autopicks = {} self._init_autopicks = {}
if hasattr(self.parent(), 'filteroptions'):
self.filteroptions = self.parent().filteroptions
else:
self.filteroptions = FILTERDEFAULTS self.filteroptions = FILTERDEFAULTS
self.pick_block = False self.pick_block = False
self.nextStation = QtGui.QCheckBox('Continue with next station.') self.nextStation = QtGui.QCheckBox('Continue with next station.')
@ -1160,7 +1163,10 @@ class PickDlg(QDialog):
def getFilterOptions(self, phase): def getFilterOptions(self, phase):
options = self.filteroptions[phase[0]] options = self.filteroptions[phase[0]]
if type(options) == dict:
return FilterOptions(**options) return FilterOptions(**options)
else:
return options
def getXLims(self): def getXLims(self):
return self.cur_xlim return self.cur_xlim