[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):
if self.get_data():
if self.getFilterOptions() and self.filterAction.isChecked():
kwargs = self.getFilterOptions()['P'].parseFilterOptions()
kwargs = self.getFilterOptions()[self.getSeismicPhase()].parseFilterOptions()
self.pushFilterWF(kwargs)
elif self.filterAction.isChecked():
self.adjustFilterOptions()
@ -1557,7 +1557,7 @@ class MainWindow(QMainWindow):
filteroptions = self.filterDlg.getFilterOptions()
self.setFilterOptions(filteroptions)
if self.filterAction.isChecked():
kwargs = self.getFilterOptions().parseFilterOptions()
kwargs = self.getFilterOptions()[self.getSeismicPhase()].parseFilterOptions()
self.pushFilterWF(kwargs)
self.plotWaveformDataThread()

View File

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