Restitute and calculate magnitudes only on picked traces.
This commit is contained in:
parent
2ecd7b1ec5
commit
f21973c7b6
8
PyLoT.py
8
PyLoT.py
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user