From fce956dd5507ef7c45e10e9311c441f0336cb9e9 Mon Sep 17 00:00:00 2001 From: "Montare, Aidan A. (Fed)" Date: Tue, 23 Apr 2024 11:30:31 -0600 Subject: [PATCH] change nperseg argument to match len(y) removes UserWarning from scipy that says nperseg should not be greater than input length --- magFunctions.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/magFunctions.py b/magFunctions.py index ac98514..9553bff 100644 --- a/magFunctions.py +++ b/magFunctions.py @@ -434,7 +434,7 @@ def magspect( xlim = [start, end] - f, t, Zxx = stft(y - np.mean(y), fs=1, nperseg=1800, noverlap=1200) + f, t, Zxx = stft(y - np.mean(y), fs=1, nperseg=len(y), noverlap=1200) dt_list = [start + datetime.timedelta(seconds=ii) for ii in t] axs[idx, sideidx].grid(False)