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,"
|
||||
" no magnitude calculation possible! Go on.")
|
||||
continue
|
||||
wf = self.stream.select(station=station)
|
||||
if not wf:
|
||||
continue
|
||||
try:
|
||||
scopy = wf.copy()
|
||||
scopy = self.stream.copy()
|
||||
except AssertionError:
|
||||
print("WARNING: Something's wrong with the data,"
|
||||
"station {},"
|
||||
"no calculation of moment magnitude possible! Go on.".format(station))
|
||||
continue
|
||||
wf = scopy.select(station=station)
|
||||
if not wf:
|
||||
continue
|
||||
onset = pick.time
|
||||
distance = degrees2kilometers(a.distance)
|
||||
azimuth = a.azimuth
|
||||
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,
|
||||
self.plot_flag, self.verbose)
|
||||
if w0 is None or fc is None:
|
||||
if self.verbose:
|
||||
print("WARNING: insufficient frequency information")
|
||||
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,
|
||||
distance, self.verbose)
|
||||
self.moment_props = (station, dict(w0=w0, fc=fc, Mo=m0))
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
:author: Ludger Kueperkoch, BESTEC GmbH
|
||||
"""
|
||||
|
||||
import warnings
|
||||
import matplotlib.pyplot as plt
|
||||
import numpy as np
|
||||
@ -596,8 +595,6 @@ def select_for_phase(st, phase):
|
||||
alter_comp = compclass.getCompPosition(comp)
|
||||
alter_comp = str(alter_comp[0])
|
||||
sel_st += st.select(component=comp)
|
||||
if len(sel_st) < 1:
|
||||
sel_st += st.select(component="Q")
|
||||
sel_st += st.select(component=alter_comp)
|
||||
elif phase.upper() == 'S':
|
||||
comps = 'NE'
|
||||
|
Loading…
Reference in New Issue
Block a user