From 3c47250fb47b5cfe1bccf422721756548b557fd6 Mon Sep 17 00:00:00 2001 From: linarphy Date: Mon, 27 May 2024 17:31:17 +0200 Subject: [PATCH] Fix filtering --- src/science_signal/signal.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/science_signal/signal.py b/src/science_signal/signal.py index 069998b..efe28e4 100644 --- a/src/science_signal/signal.py +++ b/src/science_signal/signal.py @@ -6,7 +6,7 @@ from numpy import ( float64, linspace, array, - logical_and, + logical_or, sin, where, arange, @@ -120,7 +120,7 @@ class Signal: end = max(abs(freq_x)) index_to_remove = where( - logical_and(abs(freq_x) <= start, abs(freq_x) >= end) + logical_or(abs(freq_x) <= start, abs(freq_x) >= end) ) freq_y[index_to_remove] = 0 y = irfft(freq_y)