On the way to stable magnitude determination, still buggy!
This commit is contained in:
parent
ed9a7c27aa
commit
025822c485
12
PyLoT.py
12
PyLoT.py
@ -2974,7 +2974,7 @@ class MainWindow(QMainWindow):
|
|||||||
# os.remove(phasefile)
|
# os.remove(phasefile)
|
||||||
|
|
||||||
self.get_data().applyEVTData(lt.read_location(locpath), typ='event')
|
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):
|
def init_array_tab(self):
|
||||||
'''
|
'''
|
||||||
@ -3314,11 +3314,11 @@ class MainWindow(QMainWindow):
|
|||||||
wf_copy = self.get_data().getWFData().copy()
|
wf_copy = self.get_data().getWFData().copy()
|
||||||
corr_wf, rest_flag = restitute_data(wf_copy, self.metadata)
|
corr_wf, rest_flag = restitute_data(wf_copy, self.metadata)
|
||||||
|
|
||||||
if not rest_flag:
|
#if not rest_flag:
|
||||||
# raise ProcessingError('Restitution of waveform data failed!')
|
# # raise ProcessingError('Restitution of waveform data failed!')
|
||||||
print('Restitution of waveform data failed!')
|
# print('Restitution of waveform data failed!')
|
||||||
return None
|
# return None
|
||||||
else:
|
#else:
|
||||||
if type == 'ML':
|
if type == 'ML':
|
||||||
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)
|
||||||
|
@ -6,7 +6,7 @@ Revised/extended summer 2017.
|
|||||||
|
|
||||||
:author: Ludger Küperkoch / MAGS2 EP3 working group
|
:author: Ludger Küperkoch / MAGS2 EP3 working group
|
||||||
"""
|
"""
|
||||||
|
import pdb
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import obspy.core.event as ope
|
import obspy.core.event as ope
|
||||||
@ -381,8 +381,13 @@ class MomentMagnitude(Magnitude):
|
|||||||
# NLLoc: time_weight = 0 => do not use onset!
|
# NLLoc: time_weight = 0 => do not use onset!
|
||||||
if a.time_weight == 0:
|
if a.time_weight == 0:
|
||||||
continue
|
continue
|
||||||
pick = a.pick_id.get_referred_object()
|
|
||||||
station = pick.waveform_id.station_code
|
station = pick.waveform_id.station_code
|
||||||
|
if len(self.stream) <= 2:
|
||||||
|
print("Station:", station)
|
||||||
|
print("WARNING: No instrument corrected data available, \
|
||||||
|
no magnitude calculation possible! Go on.")
|
||||||
|
continue
|
||||||
|
pick = a.pick_id.get_referred_object()
|
||||||
scopy = self.stream.copy()
|
scopy = self.stream.copy()
|
||||||
wf = scopy.select(station=station)
|
wf = scopy.select(station=station)
|
||||||
if not wf:
|
if not wf:
|
||||||
|
Loading…
Reference in New Issue
Block a user