-
Couldn't load subscription status.
- Fork 37
Zoom Fast Fourier Transform and Chirp Z-Transform #178
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
Conversation
Codecov Report
@@ Coverage Diff @@
## master #178 +/- ##
==========================================
+ Coverage 81.28% 81.45% +0.16%
==========================================
Files 96 98 +2
Lines 7182 7273 +91
==========================================
+ Hits 5838 5924 +86
- Misses 1344 1349 +5
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
Also modify the thresholds since the ZoomFFT is not really accurate.
This line should be disabled when support for Python 3.7 is dropped.
|
@syhaffert This is still waiting for your review, and is now blocking another PR that I'm working on. |
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.
Looks good. I had 1 comment.
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.
This PR is approved for merging.
The ZoomFFT is a Fourier transform based on the chirp Z-transform. Asymptotically it is faster than the MFT - since it's implemented using FFTs, its complexity is O(N^2 log(N)) for 2D transforms - the point of equality is only reached at array sizes of 1k x 1k (input) to 1k x 1k (output) or larger.
This Fourier transform will be added to the
make_fourier_transform()function with a later PR. This PR is just for adding its implementation and the tests to support it long term.One short-term caveat for the tests: the chirp Z-transform is tested by comparing with the scipy implementation of the CZT. We're not using that implementation since the FFTs that it uses are not accelerated. However, the scipy implementation is only available from version 1.8.0 onwards, which does not support Python 3.7. Therefore, I had to disable the CZT tests when scipy >=1.8.0 is not installed, so only on Python 3.8+. This caveat will be resolved when support for Python 3.7 will be dropped from HCIPy.