[bugfix] filteroptions were not loaded from project
This commit is contained in:
parent
90bc7642fd
commit
2e5ed974f0
23
PyLoT.py
23
PyLoT.py
@ -194,15 +194,8 @@ class MainWindow(QMainWindow):
|
|||||||
# setup UI
|
# setup UI
|
||||||
self.setupUi()
|
self.setupUi()
|
||||||
|
|
||||||
filter_info = readFilterInformation(self._inputs)
|
self.updateFilteroptions()
|
||||||
p_filter = filter_info['P']
|
|
||||||
s_filter = filter_info['S']
|
|
||||||
self.filteroptions = {'P': FilterOptions(p_filter['filtertype'],
|
|
||||||
p_filter['freq'],
|
|
||||||
p_filter['order']),
|
|
||||||
'S': FilterOptions(s_filter['filtertype'],
|
|
||||||
s_filter['freq'],
|
|
||||||
s_filter['order'])}
|
|
||||||
self.loc = False
|
self.loc = False
|
||||||
|
|
||||||
def setupUi(self):
|
def setupUi(self):
|
||||||
@ -794,6 +787,17 @@ class MainWindow(QMainWindow):
|
|||||||
def metadata(self, value):
|
def metadata(self, value):
|
||||||
self._metadata = value
|
self._metadata = value
|
||||||
|
|
||||||
|
def updateFilteroptions(self):
|
||||||
|
filter_info = readFilterInformation(self._inputs)
|
||||||
|
p_filter = filter_info['P']
|
||||||
|
s_filter = filter_info['S']
|
||||||
|
self.filteroptions = {'P': FilterOptions(p_filter['filtertype'],
|
||||||
|
p_filter['freq'],
|
||||||
|
p_filter['order']),
|
||||||
|
'S': FilterOptions(s_filter['filtertype'],
|
||||||
|
s_filter['freq'],
|
||||||
|
s_filter['order'])}
|
||||||
|
|
||||||
def updateFileMenu(self):
|
def updateFileMenu(self):
|
||||||
|
|
||||||
self.fileMenu.clear()
|
self.fileMenu.clear()
|
||||||
@ -3026,6 +3030,7 @@ class MainWindow(QMainWindow):
|
|||||||
if hasattr(self.project, 'parameter'):
|
if hasattr(self.project, 'parameter'):
|
||||||
if self.project.parameter:
|
if self.project.parameter:
|
||||||
self._inputs = self.project.parameter
|
self._inputs = self.project.parameter
|
||||||
|
self.updateFilteroptions()
|
||||||
self.tabs.setCurrentIndex(0) # implemented to prevent double-loading of waveform data
|
self.tabs.setCurrentIndex(0) # implemented to prevent double-loading of waveform data
|
||||||
self.init_events(new=True)
|
self.init_events(new=True)
|
||||||
self.setDirty(False)
|
self.setDirty(False)
|
||||||
|
@ -1 +1 @@
|
|||||||
69955-dirty
|
90bc-dirty
|
||||||
|
@ -441,7 +441,7 @@ class FilterOptions(object):
|
|||||||
if self:
|
if self:
|
||||||
robject = {'type': self.getFilterType(),
|
robject = {'type': self.getFilterType(),
|
||||||
'corners': self.getOrder(),
|
'corners': self.getOrder(),
|
||||||
'zerophase': True}
|
'zerophase': False}
|
||||||
if not self.getFilterType() in ['highpass', 'lowpass']:
|
if not self.getFilterType() in ['highpass', 'lowpass']:
|
||||||
robject['freqmin'] = self.getFreq()[0]
|
robject['freqmin'] = self.getFreq()[0]
|
||||||
robject['freqmax'] = self.getFreq()[1]
|
robject['freqmax'] = self.getFreq()[1]
|
||||||
|
Loading…
Reference in New Issue
Block a user