Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Filter Creation Off-By-1 #46

Closed
frouwen opened this issue Mar 15, 2022 · 2 comments · Fixed by #47
Closed

Filter Creation Off-By-1 #46

frouwen opened this issue Mar 15, 2022 · 2 comments · Fixed by #47

Comments

@frouwen
Copy link

frouwen commented Mar 15, 2022

window[i] = 0.5 - 0.5 * Math.Cos(2 * Math.PI * i / size);

Shouldn't this line be:
window[i] = 0.5 - 0.5 * Math.Cos(2 * Math.PI * i / (size-1));

Otherwise the window is not symmetric.

@swharden
Copy link
Owner

Thanks for reporting this @frouwen! In #47 I extensively tested all the window functions against Python/scipy to ensure correctness, making a few small corrections in the process. I'm releasing an updated NuGet package tonight reflecting these changes 👍 🚀

@frouwen
Copy link
Author

frouwen commented Mar 28, 2022

Awesome! You made some very nice improvements! Your libraries make my life considerably easier. Keep up the good work 😄.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants