-
Notifications
You must be signed in to change notification settings - Fork 13
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
Implement filter tests for complex signals #460
Conversation
We might get away with fewer tests if we test only if the three filter classes FilterFIR, FilterIIR, and FilterSOS can handle complex input. If this is the case, all pyfar filter functions will be good, as far as I understand. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the effort. Only had a tiny question
def test_filter_sos_process_complex(impulse_complex): | ||
sos = np.array([[1, 1/2, 0, 1, 0, 0]]) | ||
filt = fo.FilterSOS(sos, impulse_complex.sampling_rate) | ||
coeff = np.array([[1, 1/2, 0], [1, 0, 0]]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are you initializing twice? According to the docs the shape of the coefficients should be (1, 1, 6)
did that not work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It was a copy and paste from the test for the non complex data, to be honest :) ... I removed. Also in the non complex test. Should I also test it with coefficients (1, 1, 6)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it and filt.coefficients
has shape (1,1,6)
in both cases. but maybe inputting the coefficients according to the docs is less confusing, i.e., using sos = np.array([[[1, 1/2, 0, 1, 0, 0]]])
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you for implementing
Co-authored-by: Anne Heimes <64446926+ahms5@users.noreply.github.com>
unit testing for filtering complex signals