We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d423d55 commit 13b465aCopy full SHA for 13b465a
sourcespec/spectrum.py
@@ -626,6 +626,8 @@ def from_obspy_trace(self, trace):
626
raise TypeError('Only ObsPy Trace objects are supported')
627
if len(trace.data) < 10:
628
raise ValueError('The trace must have at least 10 samples')
629
+ if np.all(trace.data == 0):
630
+ raise ValueError('Trace is all zeros')
631
signal = trace.data
632
delta = trace.stats.delta
633
amp, freq = signal_fft(signal, delta)
0 commit comments