From e6f404a219bde435463bbed1c10ac22aa21fdb2e Mon Sep 17 00:00:00 2001 From: Sebastianw Wehling-Benatelli Date: Mon, 7 Mar 2016 10:15:42 +0100 Subject: [PATCH] [closes #188] picks are set correctly now earliest and latest possible picks are now derived from the actually displayed (in some cases filtered) waveforms --- pylot/core/util/widgets.py | 24 +++++++++++++++--------- 1 file changed, 15 insertions(+), 9 deletions(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index d9b4cd22..0a2b1c7b 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -521,10 +521,10 @@ class PickDlg(QDialog): settings = QSettings() - nfac = settings.value('picking/nfac_P', 1.5) - noise_win = settings.value('picking/noise_win_P', 5.) - gap_win = settings.value('picking/gap_win_P', .2) - signal_win = settings.value('picking/signal_win_P', 3.) + nfac = settings.value('picking/nfac_S', 1.5) + noise_win = settings.value('picking/noise_win_S', 5.) + gap_win = settings.value('picking/gap_win_S', .2) + signal_win = settings.value('picking/signal_win_S', 3.) # copy data for plotting data = self.getWFData().copy() @@ -583,15 +583,21 @@ class PickDlg(QDialog): pick = gui_event.xdata # get pick time relative to the traces timeaxis not to the global channel = self.getChannelID(round(gui_event.ydata)) - wfdata = self.getWFData().copy().select(channel=channel) - stime = self.getStartTime() - # get earliest and latest possible pick and symmetric pick error - [epp, lpp, spe] = earllatepicker(wfdata, 1.5, (5., .5, 2.), pick) - # get name of phase actually picked phase = self.selectPhase.currentText() + # get filter parameter for the phase to be picked + filteroptions = self.getFilterOptions(phase).parseFilterOptions() + + # copy and filter data for earliest and latest possible picks + wfdata = self.getWFData().copy().select(channel=channel) + wfdata.filter(**filteroptions) + + # get earliest and latest possible pick and symmetric pick error + [epp, lpp, spe] = earllatepicker(wfdata, 1.5, (5., .5, 2.), pick) + # return absolute time values for phases + stime = self.getStartTime() epp = stime + epp mpp = stime + pick lpp = stime + lpp