[modified] restructured filterWaveformData method in order to make the GUI more intuitive
This commit is contained in:
parent
a2047aa37b
commit
2201c3ea4d
19
QtPyLoT.py
19
QtPyLoT.py
@ -544,18 +544,17 @@ class MainWindow(QMainWindow):
|
|||||||
return True
|
return True
|
||||||
return False
|
return False
|
||||||
|
|
||||||
if self.filterAction.isChecked():
|
def pushFilterWF(kwdict):
|
||||||
kwargs = {}
|
|
||||||
freq = self.getFilterOptions().getFreq()
|
|
||||||
if freq is not None and len(freq) > 1:
|
|
||||||
kwargs['freqmin'] = freq[0]
|
|
||||||
kwargs['freqmax'] = freq[1]
|
|
||||||
elif freq is not None and len(freq) == 1:
|
|
||||||
kwargs['freq'] = freq
|
|
||||||
if hasfreq(kwargs):
|
if hasfreq(kwargs):
|
||||||
kwargs['type'] = self.getFilterOptions().getFilterType()
|
|
||||||
kwargs['corners'] = self.getFilterOptions().getOrder()
|
|
||||||
self.getData().filterWFData(kwargs)
|
self.getData().filterWFData(kwargs)
|
||||||
|
|
||||||
|
if self.getFilterOptions() and self.filterAction.isChecked():
|
||||||
|
kwargs = self.getFilterOptions().parseFilterOptions()
|
||||||
|
pushFilterWF(kwargs)
|
||||||
|
elif self.filterAction.isChecked():
|
||||||
|
self.adjustFilterOptions()
|
||||||
|
kwargs = self.getFilterOptions().parseFilterOptions()
|
||||||
|
pushFilterWF(kwargs)
|
||||||
else:
|
else:
|
||||||
self.getData().resetWFData()
|
self.getData().resetWFData()
|
||||||
self.plotWaveformData()
|
self.plotWaveformData()
|
||||||
|
Loading…
Reference in New Issue
Block a user