Fix filtering
This commit is contained in:
parent
87bfb96cf6
commit
3c47250fb4
1 changed files with 2 additions and 2 deletions
|
@ -6,7 +6,7 @@ from numpy import (
|
||||||
float64,
|
float64,
|
||||||
linspace,
|
linspace,
|
||||||
array,
|
array,
|
||||||
logical_and,
|
logical_or,
|
||||||
sin,
|
sin,
|
||||||
where,
|
where,
|
||||||
arange,
|
arange,
|
||||||
|
@ -120,7 +120,7 @@ class Signal:
|
||||||
end = max(abs(freq_x))
|
end = max(abs(freq_x))
|
||||||
|
|
||||||
index_to_remove = where(
|
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
|
freq_y[index_to_remove] = 0
|
||||||
y = irfft(freq_y)
|
y = irfft(freq_y)
|
||||||
|
|
Loading…
Reference in a new issue