[Numpy-discussion] chirp-z

Stefan van der Walt stefan at sun.ac.za
Mon May 28 04:12:58 EDT 2007


On Mon, May 28, 2007 at 03:15:33PM +0900, David Cournapeau wrote:
> Matthieu Brucher wrote:
> >
> >     There really aren't any transparent fast fft convolutions in
> >     SciPy. The closest thing is in signaltools, fftconvolve, and if
> >     you ask it to convolve, say, sequences whose length add up to
> >     7902, then it will do a size 7901 transform.
> >
> >
> > BTW, is this really a glitch ? I think there is two schools there :
> > - those who think the software must do something
> > - those who think it is the programmer's responsibility.
> >
> > If I give to a fftconvolve sequences that add up this way, I want it 
> > to use a 7901 transform, not a 2^n transform. So you understood I'm in 
> > the second group.
> I may miss something, but in theory at least, using zeros padding and 
> fft of size 2^N (8192 here) will give you exactly the same result that 
> doing fft of size 7901 if done right. Then, there are some precision 
> problems which may appear, but I don't think they are significant for 
> common cases. For example, I know for sure that matlab implements fast 
> convolution/correlation this way (eg in lpc code, for example).

There is also the problem that you suddenly double your memory usage.

Stéfan



More information about the NumPy-Discussion mailing list