Compare commits
No commits in common. "3af02bbbf7aeafd9b79b15b7bd2d699eb0878d82" and "6e40811b012d45c4ac2ba52f9f92d871cc63a866" have entirely different histories.
3af02bbbf7
...
6e40811b01
@ -400,28 +400,30 @@ class MomentMagnitude(Magnitude):
|
|||||||
print("WARNING: No instrument corrected data available,"
|
print("WARNING: No instrument corrected data available,"
|
||||||
" no magnitude calculation possible! Go on.")
|
" no magnitude calculation possible! Go on.")
|
||||||
continue
|
continue
|
||||||
wf = self.stream.select(station=station)
|
|
||||||
if not wf:
|
|
||||||
continue
|
|
||||||
try:
|
try:
|
||||||
scopy = wf.copy()
|
scopy = self.stream.copy()
|
||||||
except AssertionError:
|
except AssertionError:
|
||||||
print("WARNING: Something's wrong with the data,"
|
print("WARNING: Something's wrong with the data,"
|
||||||
"station {},"
|
"station {},"
|
||||||
"no calculation of moment magnitude possible! Go on.".format(station))
|
"no calculation of moment magnitude possible! Go on.".format(station))
|
||||||
continue
|
continue
|
||||||
|
wf = scopy.select(station=station)
|
||||||
|
if not wf:
|
||||||
|
continue
|
||||||
onset = pick.time
|
onset = pick.time
|
||||||
distance = degrees2kilometers(a.distance)
|
distance = degrees2kilometers(a.distance)
|
||||||
azimuth = a.azimuth
|
azimuth = a.azimuth
|
||||||
incidence = a.takeoff_angle
|
incidence = a.takeoff_angle
|
||||||
w0, fc = calcsourcespec(scopy, onset, self.p_velocity, distance,
|
w0, fc = calcsourcespec(wf, onset, self.p_velocity, distance,
|
||||||
azimuth, incidence, self.p_attenuation,
|
azimuth, incidence, self.p_attenuation,
|
||||||
self.plot_flag, self.verbose)
|
self.plot_flag, self.verbose)
|
||||||
if w0 is None or fc is None:
|
if w0 is None or fc is None:
|
||||||
if self.verbose:
|
if self.verbose:
|
||||||
print("WARNING: insufficient frequency information")
|
print("WARNING: insufficient frequency information")
|
||||||
continue
|
continue
|
||||||
WF = select_for_phase(scopy, "P")
|
WF = select_for_phase(self.stream.select(
|
||||||
|
station=station), a.phase)
|
||||||
|
WF = select_for_phase(WF, "P")
|
||||||
m0, mw = calcMoMw(WF, w0, self.rock_density, self.p_velocity,
|
m0, mw = calcMoMw(WF, w0, self.rock_density, self.p_velocity,
|
||||||
distance, self.verbose)
|
distance, self.verbose)
|
||||||
self.moment_props = (station, dict(w0=w0, fc=fc, Mo=m0))
|
self.moment_props = (station, dict(w0=w0, fc=fc, Mo=m0))
|
||||||
|
@ -7,7 +7,6 @@
|
|||||||
|
|
||||||
:author: Ludger Kueperkoch, BESTEC GmbH
|
:author: Ludger Kueperkoch, BESTEC GmbH
|
||||||
"""
|
"""
|
||||||
|
|
||||||
import warnings
|
import warnings
|
||||||
import matplotlib.pyplot as plt
|
import matplotlib.pyplot as plt
|
||||||
import numpy as np
|
import numpy as np
|
||||||
@ -596,8 +595,6 @@ def select_for_phase(st, phase):
|
|||||||
alter_comp = compclass.getCompPosition(comp)
|
alter_comp = compclass.getCompPosition(comp)
|
||||||
alter_comp = str(alter_comp[0])
|
alter_comp = str(alter_comp[0])
|
||||||
sel_st += st.select(component=comp)
|
sel_st += st.select(component=comp)
|
||||||
if len(sel_st) < 1:
|
|
||||||
sel_st += st.select(component="Q")
|
|
||||||
sel_st += st.select(component=alter_comp)
|
sel_st += st.select(component=alter_comp)
|
||||||
elif phase.upper() == 'S':
|
elif phase.upper() == 'S':
|
||||||
comps = 'NE'
|
comps = 'NE'
|
||||||
|
Loading…
Reference in New Issue
Block a user