[SciPy-User] 2d convolution

Joseph Anderson j.anderson at hull.ac.uk
Tue Mar 23 11:48:27 EDT 2010


>> If it is much faster than the n-dimensional fft convolution
> 
> For me it is about 60(!) times faster, see the attached graph (mind
> the log scaling).
> I had NxN data with NxN kernels convolved.

This is interesting.

>> be worth writing a fftconvolve2
> What remains to be checked is the ratio for the case where the kernel
> is a lot smaller than the data. If that turns out to be equally fast,
> I don't see any reason to keep the current implementation of
> scipy.signal.fftconvolve.
> 
> Anyway, this may also be related to that other discussion going on
> about FFTW. I'm not sure what the current status about FFT
> implementations in SciPy is, but at first glance there seem to be
> quite a few really, which to me seems redundant and unhelpful.

On this point, I can echo. A quick look turns up:

scipy.fftpack.convolve
scipy.signal.convolve
scipy.signal.fftconvolve
scipy.stsci.convolve
numpy.convolve


I've used scipy.signal.fftconvolve as that's where other signal processing
tools useful to me have been found.

IMHO, ideally, there would be one 'fast' convolve that does the right thing.

I can understand that different convolves in different name spaces exist for
historical and practical reasons. So, maybe there's an argument to keep all
these numerous convolves. (Some appear to be direct, rather than fft
convolves--reason enough to keep those.)

Maybe a thing to do would be a page someplace clarifying which are the
fastest?

Or... 'rewrite' so that all use a fast convolution routine, but preserve the
separate interfaces (if they exist) as necessary?

******



My regards,

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Dr Joseph Anderson
Lecturer in Music

School of Arts and New Media
University of Hull, Scarborough Campus,
Scarborough, North Yorkshire, YO11 3AZ, UK

T: +44.(0)1723.362392 T: +44.(0)1723.357370 F: +44.(0)1723.350815
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


*****************************************************************************************
To view the terms under which this email is distributed, please go to http://www.hull.ac.uk/legal/email_disclaimer.html
*****************************************************************************************



More information about the SciPy-User mailing list