Restitute and calculate magnitudes only on picked traces.
This commit is contained in:
parent
2ecd7b1ec5
commit
f21973c7b6
20
PyLoT.py
20
PyLoT.py
@ -3375,18 +3375,20 @@ 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'),
|
||||||
self.inputs.get('Qp'), self.inputs.get('rho'), verbosity=True)
|
self.inputs.get('Qp'), self.inputs.get('rho'), verbosity=True)
|
||||||
# calculate local magnitude
|
# calculate local magnitude
|
||||||
local_mag = LocalMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('sstop'),
|
local_mag = LocalMagnitude(corr_wf, self.get_data().get_evt_data(), self.inputs.get('sstop'),
|
||||||
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