question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add chirp Z-transform, zoom FFT

See original GitHub issue

As mentioned in numpy/numpy/issues/1177, Chirp Z-transform and special cases of it have been submitted to SciPy under public domain by Paul Kienzle and Nadav Horesh: [SciPy-user] Chirp Z transform

The special cases of CZT are zoom FFT and “scaled FFT” (not sure what that does). DFT is also a special case of CZT, so if you call czt(data) with the default options, it’s an FFT, but faster for prime sizes because of Bluestein’s algorithm, useful in resample for instance? (#3956):

x = rand(42073) # prime length

allclose(czt(x), fft(x))
Out[37]: True

timeit czt(x)
10 loops, best of 3: 53.9 ms per loop

timeit fft(x)
1 loops, best of 3: 2.35 s per loop

2.35 / 53.9e-3 # speedup factor
Out[40]: 43.59925788497217

@stefanv said:

Thank you both for the contribution! I’ve reviewed the code and think it should be included in SciPy. Would someone else like to have a look before I commit it?

Where would the best place for this be? scipy.fftpack?

I think it makes sense to put it in scipy.fftpack, too, though that doesn’t have any classes, just functions. (Unless it should all be put in numpy, but I’m guessing zoom FFT is too specialized for that?)

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:2
  • Comments:15 (14 by maintainers)

github_iconTop GitHub Comments

1reaction
mreineckcommented, Aug 16, 2019

With the switch to pocketfft(which automatically uses Bluestein’s algorithm when useful), this is most likely no longer needed for prime-sized FFTs.

For the CZT itself I’ll be happy to help with any necessary adjustments to the new FFT infrastructure.

0reactions
rgommerscommented, Aug 17, 2019

Yes, gh-4607 is enough. Feature request issues are good for discussion, but no need to keep them open once there’s a PR.

Issues our mainly for bugs, our bug count (discovered + undiscovered) is finite, while potential new feature count is infinite:)

Read more comments on GitHub >

github_iconTop Results From Across the Web

Chirp Z-Transform Spectral Zoom Optimization with MATLAB
This technique is the chirp z-transform spectral zoom. The chirp z-transform, or CZT, computes the z-transform along spiral contours in the z-plane for...
Read more >
Fast Fourier and z-transforms with almost arbitrary frequency ...
– Chirp Transform Algorithm (CTA): DFT with non-uniform frequency spacing. (Type II.) ○ Not a Fourier transform: Chirp-z transform (CZT).
Read more >
fft - What transform can I use to "zoom" in a specific portion of a ...
The 'Zoom-FFT' involves downsampling / BPF / FFT, whereas the Chirp-Z Transform evaluates the Z-transform on the band you want. I have heard ......
Read more >
Zooming Chirp Z - Katja
For a next testcase I entered cosines with periodicity 5.32 and 100.32. A non-zooming transform shows the major peaks at index 5 and...
Read more >
Chirp Z-transform - Wikipedia
The chirp Z-transform (CZT) is a generalization of the discrete Fourier transform (DFT). While the DFT samples the Z plane at uniformly-spaced points...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found