Restitute and calculate magnitudes only on picked traces.

This commit is contained in:
Ludger Küperkoch 2019-09-11 12:13:53 +02:00
parent 2ecd7b1ec5
commit f21973c7b6

View File

@ -3375,7 +3375,11 @@ class MainWindow(QMainWindow):
return None return None
wf_copy = self.get_data().getWFData().copy() wf_copy = self.get_data().getWFData().copy()
corr_wf = restitute_data(wf_copy, self.metadata) # restitute only picked traces
for picks in self.getPicks():
station = picks
wf_select = wf_copy.select(station=station)
corr_wf = restitute_data(wf_select, self.metadata)
# calculate moment magnitude # calculate moment magnitude
moment_mag = MomentMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('vp'), moment_mag = MomentMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('vp'),
@ -3385,8 +3389,6 @@ class MainWindow(QMainWindow):
self.inputs.get('WAscaling'), verbosity=True) self.inputs.get('WAscaling'), verbosity=True)
return local_mag.updated_event(), moment_mag.updated_event() return local_mag.updated_event(), moment_mag.updated_event()
# else:
# return None
def check4Loc(self): def check4Loc(self):
return self.picksNum() >= 4 return self.picksNum() >= 4