[add] filter parameters added to default parameters

This commit is contained in:
Marcel Paffrath 2017-06-22 12:01:22 +02:00
parent 97ee03b443
commit ca1d3dca38
4 changed files with 31 additions and 5 deletions

View File

@ -1 +1 @@
f91e1-dirty 97ee-dirty

View File

@ -282,8 +282,24 @@ defaults = {'rootpath': {'type': str,
'value': (1.0, 1.0, 1.0)}, 'value': (1.0, 1.0, 1.0)},
'magscaling': {'type': (float, float), 'magscaling': {'type': (float, float),
'tooltip': 'Scaling relation for derived local magnitude [a*Ml+b]', 'tooltip': 'Scaling relation for derived local magnitude [a*Ml+b]',
'value': (1.0, 1.0)} 'value': (1.0, 1.0)},
'minfreq': {'type': float,
'tooltip': 'Lower filter frequency',
'value': 1.0},
'maxfreq': {'type': float,
'tooltip': 'Upper filter frequency',
'value': 10.0},
'filter_order': {'type': int,
'tooltip': 'filter order',
'value': 2},
'filter_type': {'type': str,
'tooltip': 'filter type (bandpass, bandstop, lowpass, highpass)',
'value': None}
} }
settings_main={ settings_main={
@ -309,6 +325,11 @@ settings_main={
'localmag':[ 'localmag':[
'WAscaling', 'WAscaling',
'magscaling'], 'magscaling'],
'filter':[
'minfreq',
'maxfreq',
'filter_order',
'filter_type'],
'pick':[ 'pick':[
'extent', 'extent',
'pstart', 'pstart',

View File

@ -142,6 +142,7 @@ class PylotParameter(object):
all_names += self.get_main_para_names()['smoment'] all_names += self.get_main_para_names()['smoment']
all_names += self.get_main_para_names()['localmag'] all_names += self.get_main_para_names()['localmag']
all_names += self.get_main_para_names()['pick'] all_names += self.get_main_para_names()['pick']
all_names += self.get_main_para_names()['filter']
all_names += self.get_special_para_names()['z'] all_names += self.get_special_para_names()['z']
all_names += self.get_special_para_names()['h'] all_names += self.get_special_para_names()['h']
all_names += self.get_special_para_names()['fm'] all_names += self.get_special_para_names()['fm']
@ -237,6 +238,8 @@ class PylotParameter(object):
'parameters for seismic moment estimation', seperator) 'parameters for seismic moment estimation', seperator)
self.write_section(fid_out, self.get_main_para_names()['localmag'], self.write_section(fid_out, self.get_main_para_names()['localmag'],
'settings local magnitude', seperator) 'settings local magnitude', seperator)
self.write_section(fid_out, self.get_main_para_names()['filter'],
'filter settings', seperator)
self.write_section(fid_out, self.get_main_para_names()['pick'], self.write_section(fid_out, self.get_main_para_names()['pick'],
'common settings picker', seperator) 'common settings picker', seperator)
fid_out.write(('#special settings for calculating CF#\n'+ fid_out.write(('#special settings for calculating CF#\n'+

View File

@ -2135,8 +2135,10 @@ class PylotParaBox(QtGui.QWidget):
self.parameter.get_main_para_names()['smoment'], 2) self.parameter.get_main_para_names()['smoment'], 2)
self.add_to_layout(self._main_layout, 'Local Magnitude', self.add_to_layout(self._main_layout, 'Local Magnitude',
self.parameter.get_main_para_names()['localmag'], 3) self.parameter.get_main_para_names()['localmag'], 3)
self.add_to_layout(self._main_layout, 'Filter Settings',
self.parameter.get_main_para_names()['filter'], 4)
self.add_to_layout(self._main_layout, 'Common Settings Characteristic Function', self.add_to_layout(self._main_layout, 'Common Settings Characteristic Function',
self.parameter.get_main_para_names()['pick'], 4) self.parameter.get_main_para_names()['pick'], 5)
self.add_tab(self._main_layout, 'Main Settings') self.add_tab(self._main_layout, 'Main Settings')
def add_special_pick_parameters_tab(self): def add_special_pick_parameters_tab(self):