From 726210daeb450370dfa6ec7ce0bc5b8f0929f7d4 Mon Sep 17 00:00:00 2001 From: Marcel Date: Wed, 18 Apr 2018 16:21:27 +0200 Subject: [PATCH] [add] plot-method = 'fast' for min/max plot --- pylot/core/util/widgets.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pylot/core/util/widgets.py b/pylot/core/util/widgets.py index 37d5e004..5d3afb0f 100644 --- a/pylot/core/util/widgets.py +++ b/pylot/core/util/widgets.py @@ -496,7 +496,8 @@ class WaveformWidgetPG(QtGui.QWidget): def plotWFData(self, wfdata, wfsyn=None, title=None, zoomx=None, zoomy=None, noiselevel=None, scaleddata=False, mapping=True, - component='*', nth_sample=1, iniPick=None, verbosity=0): + component='*', nth_sample=1, iniPick=None, verbosity=0, + method='normal'): if not wfdata: print('Nothing to plot.') return @@ -557,6 +558,9 @@ class WaveformWidgetPG(QtGui.QWidget): stime_syn = trace_syn.stats.starttime - self.wfstart time_ax_syn = prepTimeAxis(stime_syn, trace_syn) + if method == 'fast': + trace.data, time_ax = self.minMax(trace, time_ax) + if time_ax not in [None, []]: if not scaleddata: trace.detrend('constant')