[bugfix] raise Exception if no Z-component is found for Magnitude calculation
This commit is contained in:
parent
9a5624c951
commit
d360d9db92
@ -510,6 +510,9 @@ def calcsourcespec(wfstream, onset, vp, delta, azimuth, incidence,
|
|||||||
|
|
||||||
zdat = select_for_phase(wfstream, "P")
|
zdat = select_for_phase(wfstream, "P")
|
||||||
|
|
||||||
|
if len(zdat) == 0:
|
||||||
|
raise IOError('No vertical component found in stream:\n{}'.format(wfstream))
|
||||||
|
|
||||||
dt = zdat[0].stats.delta
|
dt = zdat[0].stats.delta
|
||||||
|
|
||||||
freq = zdat[0].stats.sampling_rate
|
freq = zdat[0].stats.sampling_rate
|
||||||
|
Loading…
x
Reference in New Issue
Block a user