bugfix: attribute was of wrong kind for which the successive call raised an exception
This commit is contained in:
parent
d15441900e
commit
5c9f17bce3
13
QtPyLoT.py
13
QtPyLoT.py
@ -357,15 +357,22 @@ class MainWindow(QMainWindow):
|
||||
|
||||
def filterWaveformData(self):
|
||||
if self.getData():
|
||||
def hasfreq(kwargs):
|
||||
for key in kwargs.keys():
|
||||
if not key.startswith('freq'):
|
||||
return True
|
||||
return False
|
||||
kwargs = {}
|
||||
freq = self.getFilterOptions().getFreq()
|
||||
if len(freq) > 1:
|
||||
if freq is not None and len(freq) > 1:
|
||||
kwargs['freqmin'] = freq[0]
|
||||
kwargs['freqmax'] = freq[1]
|
||||
else:
|
||||
elif freq is not None and len(freq) == 1:
|
||||
kwargs['freq'] = freq
|
||||
|
||||
if hasfreq(kwargs):
|
||||
kwargs['type'] = self.getFilterOptions().getFilterType()
|
||||
kwargs['corners'] = self.filteroptions.getOrder()
|
||||
kwargs['corners'] = self.getFilterOptions().getOrder()
|
||||
self.getData().filter(kwargs)
|
||||
|
||||
def adjustFilterOptions(self):
|
||||
|
Loading…
Reference in New Issue
Block a user