Fix filtering

This commit is contained in:
linarphy 2024-05-27 17:31:17 +02:00
parent 87bfb96cf6
commit 3c47250fb4
No known key found for this signature in database
GPG key ID: E61920135EFF2295

View file

@ -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)