[bugfix] do not call calcsourcespec if incidence angle is outside bounds (for whatever reason)
This commit is contained in:
parent
ba4e6cfe50
commit
2e85d083a3
@ -418,6 +418,10 @@ class MomentMagnitude(Magnitude):
|
|||||||
distance = degrees2kilometers(a.distance)
|
distance = degrees2kilometers(a.distance)
|
||||||
azimuth = a.azimuth
|
azimuth = a.azimuth
|
||||||
incidence = a.takeoff_angle
|
incidence = a.takeoff_angle
|
||||||
|
if not 0. <= incidence <= 360.:
|
||||||
|
if self.verbose:
|
||||||
|
print(f'WARNING: Incidence angle outside bounds - {incidence}')
|
||||||
|
return
|
||||||
w0, fc = calcsourcespec(scopy, onset, self.p_velocity, distance,
|
w0, fc = calcsourcespec(scopy, 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user