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

Add Blackman-Harris window function and create go.mod file #27

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rohansatapathy
Copy link

I added a function for a Blackman-Harris window to the window package as well as the relevant tests. I ran into an issue using go test to run window_test.go, so I ran go mod init && go mod tidy in the root directory to add a go.mod file.

Currently go test will fail for a 10-point Blackman-Harris window because I didn't add enough digits to the test case in window_test.go, and I'm not sure how to get more precision from Matlab at the moment. However, I implemented the function exactly as it appears in https://www.mathworks.com/help/signal/ref/blackmanharris.html so I'm confident it's doing the correct calculations.

bartlett []float64
flatTop []float64
blackman []float64
in int
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This has not been fmt'd.

@@ -0,0 +1,3 @@
module github.com/mjibson/go-dsp

go 1.21.1
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Adding this file would definitely need to be in a separate PR. And since this repo doesn't have any tests, I'm not inclined to do that because I'm worried about unknown breakage. Also it should be the lowest supported go version, not the highest. In summary this change would need:

  • separate PR
  • running go test in a github action
  • minimum supported go version

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 this pull request may close these issues.

2 participants