Skip to content

Commit

Permalink
try something for get_win
Browse files Browse the repository at this point in the history
  • Loading branch information
waltsims committed Dec 19, 2023
1 parent 15b2423 commit 5e2bf1d
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion kwave/utils/signals.py
Original file line number Diff line number Diff line change
Expand Up @@ -142,9 +142,10 @@ def cosine_series(n: int, N: int, coeffs: List[float]) -> np.ndarray:

# create the window
if N.size == 1:
# TODO: what should this behaviour be if N is a list of ints? make windows of multiple lengths?
n = np.arange(0, N)

assert (N - 1) != 0, 'N must be greater than 1'
assert np.all(N - 1) != 0, 'N must be greater than 1'

if type_ == 'Bartlett':
win = (2 / (N - 1) * ((N - 1) / 2 - abs(n - (N - 1) / 2))).T
Expand Down

0 comments on commit 5e2bf1d

Please sign in to comment.