[bugfix] raise Exception if no Z-component is found for Magnitude calculation

This commit is contained in:
Marcel Paffrath 2018-07-12 14:13:34 +02:00
parent 9a5624c951
commit d360d9db92

View File

@ -510,6 +510,9 @@ def calcsourcespec(wfstream, onset, vp, delta, azimuth, incidence,
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
freq = zdat[0].stats.sampling_rate