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

Inaccurate butter4 bandwidth filter #1142

Open
Wuhyun opened this issue Mar 11, 2025 · 1 comment
Open

Inaccurate butter4 bandwidth filter #1142

Wuhyun opened this issue Mar 11, 2025 · 1 comment
Assignees

Comments

@Wuhyun
Copy link
Contributor

Wuhyun commented Mar 11, 2025

The current butter4 bandwidth filter obtained through tod_ops.filters.get_bpf() is inaccurate as it defines bandwidth filter as a product of a lowpass and a highpass filter. The resulting filter is not maximally flat and often yields a sub-1 frequency response at the bandpass centre. Instead, a Butterworth bandwidth filter should be calculated directly.

Demonstration using scipy:
Image

Example application to white noise:
Image

Example application to bandpass filtering needed for demodulation:
Image

Note that the sine2 filter doesn't have this issue unless trans_width >= bandpass_width.

@Wuhyun
Copy link
Contributor Author

Wuhyun commented Mar 11, 2025

Created #1143 to address this issue.

Wuhyun added a commit that referenced this issue Mar 13, 2025
Fix butter4 bandwidth filter to address #1142 and correct the docstring for demod_tod().
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

No branches or pull requests

1 participant