From 848d11270b66587a51398459ff0c144d6cb144a2 Mon Sep 17 00:00:00 2001 From: Sebastianw Wehling-Benatelli Date: Wed, 2 Mar 2016 13:37:40 +0100 Subject: [PATCH] [fixes #181] now picking on horizontal components 1, 2 and N,E is possible --- pylot/core/util/widgets.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index f13a09fd..f782a147 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -422,6 +422,11 @@ class PickDlg(QDialog): trace = selectTrace(trace, 'NE') if trace: wfdata.append(trace) + elif component == '1' or component == '2': + for trace in self.getWFData(): + trace = selectTrace(trace, '12') + if trace: + wfdata.append(trace) elif component == 'Z': wfdata = self.getWFData().select(component=component) return wfdata @@ -527,10 +532,16 @@ class PickDlg(QDialog): inoise = getnoisewin(t, ini_pick, noise_win, gap_win) trace = demeanTrace(trace, inoise) - horiz_comp = ('n', 'e') + try: + horiz_comp = ('n', 'e') + data = scaleWFData(data, noiselevel * 2.5, horiz_comp) + except IndexError as e: + print('warning: {0}'.format(e)) + horiz_comp = ('1', '2') data = scaleWFData(data, noiselevel * 2.5, horiz_comp) + x_res = getResolutionWindow(snr) self.setXLims(tuple([ini_pick - x_res, ini_pick + x_res]))