From 19ec6f74bbccd4289b72b324a17123ace872898c Mon Sep 17 00:00:00 2001 From: mhostetter Date: Tue, 17 Dec 2024 19:32:12 -0500 Subject: [PATCH] Fix `overlap` input condition Fixes #444 --- src/sdr/plot/_spectral_estimation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sdr/plot/_spectral_estimation.py b/src/sdr/plot/_spectral_estimation.py index 9e7edac1f..6b0008be9 100644 --- a/src/sdr/plot/_spectral_estimation.py +++ b/src/sdr/plot/_spectral_estimation.py @@ -64,7 +64,7 @@ def periodogram( sample_rate, sample_rate_provided = verify_sample_rate(sample_rate) # verify_isinstance(window, str, optional=True) verify_scalar(length, optional=True, int=True, positive=True) - verify_scalar(overlap, optional=True, int=True, positive=True) + verify_scalar(overlap, optional=True, int=True, non_negative=True) verify_scalar(fft, optional=True, int=True, positive=True) verify_literal(detrend, ["constant", "linear", False]) verify_literal(average, ["mean", "median"]) @@ -174,7 +174,7 @@ def spectrogram( sample_rate, sample_rate_provided = verify_sample_rate(sample_rate) # verify_isinstance(window, str, optional=True) verify_scalar(length, optional=True, int=True, positive=True) - verify_scalar(overlap, optional=True, int=True, positive=True) + verify_scalar(overlap, optional=True, int=True, non_negative=True) verify_scalar(fft, optional=True, int=True, positive=True) verify_literal(detrend, ["constant", "linear", False]) verify_isinstance(ax, plt.Axes, optional=True)