[add] plot-method = 'fast' for min/max plot

This commit is contained in:
Marcel Paffrath 2018-04-18 16:21:27 +02:00
parent e72111a6fb
commit 726210daeb

View File

@ -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')