[SciPy-user] Chirp Z transform
Stéfan van der Walt
stefan@sun.ac...
Thu Jan 22 09:05:09 CST 2009
Hi Nadav
2009/1/22 Nadav Horesh <nadavh@visionsense.com>:
> Chirp Z transform is a generalization of the Fourier transform.
> Attached here a module for chirp z transform written by Paul Kienzle and I. We tried to follow scipy's coding-style directions. Is it possible (and how) to make it a part of the scipy project?
Thanks for working on this; I, for one, would like to see it in SciPy.
Recently I referred you to another implementation at
http://www.mail-archive.com/numpy-discussion@scipy.org/msg01812.html
Your version is much more complete, but the following struck me as
slightly strange:
data = np.random.random(10000)
a = czt.czt(data, w=np.exp(-2*1j*np.pi/float(len(data)))
b = chirpz_s.chirpz(data, 1, np.exp(-2*1j*np.pi/float(len(data))), len(data))
target = np.fft.fft(data)
err_a = np.sum(np.abs(a - target))
err_b = np.sum(np.abs(b - target))
In [152]: err_a / err_b
Out[152]: 1.6138562461610748
The only reason I mention this is because you speak about the
inaccuracy in the docstring. The errors are, on average, in the
vicinity of 1e-10 vs. 5e-11 respectively, so I'm probably on a wild
goose chase.
Regards
Stéfan
More information about the SciPy-user
mailing list