On the way to stable magnitude determination, still buggy!

This commit is contained in:
Ludger Küperkoch
2019-06-14 12:35:56 +02:00
parent ed9a7c27aa
commit 025822c485
2 changed files with 22 additions and 17 deletions

View File

@@ -2974,7 +2974,7 @@ class MainWindow(QMainWindow):
# os.remove(phasefile)
self.get_data().applyEVTData(lt.read_location(locpath), typ='event')
self.get_data().applyEVTData(self.calc_magnitude(), typ='event')
#self.get_data().applyEVTData(self.calc_magnitude(), typ='event')
def init_array_tab(self):
'''
@@ -3314,21 +3314,21 @@ class MainWindow(QMainWindow):
wf_copy = self.get_data().getWFData().copy()
corr_wf, rest_flag = restitute_data(wf_copy, self.metadata)
if not rest_flag:
# raise ProcessingError('Restitution of waveform data failed!')
print('Restitution of waveform data failed!')
return None
#if not rest_flag:
# # raise ProcessingError('Restitution of waveform data failed!')
# print('Restitution of waveform data failed!')
# return None
#else:
if type == 'ML':
local_mag = LocalMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('sstop'),
self.inputs.get('WAScaling'), verbosity=True)
return local_mag.updated_event()
elif type == 'Mw':
moment_mag = MomentMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('vp'),
self.inputs.get('Qp'), self.inputs.get('rho'), verbosity=True)
return moment_mag.updated_event()
else:
if type == 'ML':
local_mag = LocalMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('sstop'),
self.inputs.get('WAScaling'), verbosity=True)
return local_mag.updated_event()
elif type == 'Mw':
moment_mag = MomentMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('vp'),
self.inputs.get('Qp'), self.inputs.get('rho'), verbosity=True)
return moment_mag.updated_event()
else:
return None
return None
def check4Loc(self):
return self.picksNum() >= 4