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

Problem in decimation #2

Closed
ashley-b opened this issue Sep 5, 2022 · 2 comments · Fixed by #4
Closed

Problem in decimation #2

ashley-b opened this issue Sep 5, 2022 · 2 comments · Fixed by #4

Comments

@ashley-b
Copy link
Contributor

ashley-b commented Sep 5, 2022

Hi, let me start of by saying am not a DSP expert.
But I have noticed scipy.signal.decimate gives poor results with large decimation values

signal decimate
But when I change

sd = signal.decimate(x, factor[idx])

to

sd = signal.resample(x, (int)(len(x) / factor[idx]))

I see this improvement
signal resample

I believe it is related to the note about not using decimate with values high than 13
https://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.decimate.html#scipy.signal.decimate

@jmrplens
Copy link
Owner

jmrplens commented Sep 6, 2022

Hi @ashley-b,

You are right, I had not seen that limitation.

Thank you very much for analyzing the results and coming up with the solution!
If you want, you can make a Pull Request or else I'll edit it directly mentioning you.

@ashley-b
Copy link
Contributor Author

ashley-b commented Sep 7, 2022

No problems, I created a PR #4

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