garrettj403 / CZT

Chirp Z-Transform
MIT License
38 stars 14 forks source link

Using czt in the freq2time function #14

Closed e-d-n-a closed 3 years ago

e-d-n-a commented 3 years ago

I partially read the source article [1] and noticed this statement:

In some cases[15], a modified version of the forward CZT algorithm, in which the logarithmic spiral contour was traversed in the opposite direction, was described as the ICZT algorithm. However, this method does not really invert the CZT. It works only in some special cases, e.g., when A=1 and W=e^(−2πi/n). That is, in the cases when the CZT reduces to the DFT. In the general case, i.e., when A,W∈C∖{0}, that method generates a transform that does not invert the CZT.

So is it legitimate to use this approach in "freq2time" utilizing the CZT, instead of the also available ICZT? I don't know what is meant with "special cases", so if it covers all ZoomFFT cases (with constant magnitudes). Is it only necessary for A and W to lie on the unit circle here!?

[1] https://www.nature.com/articles/s41598-019-50234-9

garrettj403 commented 3 years ago

Yes, time2freq and freq2time are essentially a DFT and IDFT, respectively, with |A|=|W|=1. The advantage of using the CZT package is that it is much faster because it is based on the FFT algorithm.