From 549700bf7a591c816db8af4aee6e93921eb67ef0 Mon Sep 17 00:00:00 2001 From: Marcel Date: Tue, 9 Jan 2018 09:54:39 +0100 Subject: [PATCH] [update] changed plot/filter behavior for 3comp window --- pylot/RELEASE-VERSION | 1 + pylot/core/util/widgets.py | 41 ++++++++++++++++++++------------------ 2 files changed, 23 insertions(+), 19 deletions(-) create mode 100644 pylot/RELEASE-VERSION diff --git a/pylot/RELEASE-VERSION b/pylot/RELEASE-VERSION new file mode 100644 index 00000000..9d04517d --- /dev/null +++ b/pylot/RELEASE-VERSION @@ -0,0 +1 @@ +c393-dirty diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index abc39cc1..482577dd 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -1203,6 +1203,7 @@ class PickDlg(QDialog): self.multicompfig.draw() self.multicompfig.setFocus() + # setup ui self.setupUi() @@ -2137,6 +2138,9 @@ class PickDlg(QDialog): return not self.pick_block def filterWFData(self, phase=None): + self.plotWFData(phase=phase, filter=True) + + def plotWFData(self, phase=None, filter=False): if self.pick_block: return if not phase: @@ -2145,26 +2149,25 @@ class PickDlg(QDialog): self.cur_ylim = self.multicompfig.axes[0].get_ylim() #self.multicompfig.updateCurrentLimits() data = self.getWFData().copy() - old_title = self.multicompfig.axes[0].get_title() - title = None - filtoptions = None - if phase: - filtoptions = self.getFilterOptions(self.getPhaseID(phase)).parseFilterOptions() - - # if self.filterActionP.isChecked() or self.filterActionS.isChecked(): - # if not phase: - # filtoptions = FilterOptionsDialog.getFilterObject() - # filtoptions = filtoptions.parseFilterOptions() - title = self.getStation() - if filtoptions is not None: - data.filter(**filtoptions) - title += '({} filtered'.format(filtoptions['type']) - for key, value in filtoptions.items(): - if key == 'type': - continue - title += ' {}: {},'.format(key, value) - title += ')' + if filter: + filtoptions = None + if phase: + filtoptions = self.getFilterOptions(self.getPhaseID(phase)).parseFilterOptions() + + # if self.filterActionP.isChecked() or self.filterActionS.isChecked(): + # if not phase: + # filtoptions = FilterOptionsDialog.getFilterObject() + # filtoptions = filtoptions.parseFilterOptions() + + if filtoptions is not None: + data.filter(**filtoptions) + title += '({} filtered'.format(filtoptions['type']) + for key, value in filtoptions.items(): + if key == 'type': + continue + title += ' {}: {},'.format(key, value) + title += ')' self.multicompfig.plotWFData(wfdata=data, title=title, zoomx=self.getXLims(), zoomy=self.getYLims())