[SciPy-user] Data convolution.

Stephen Walton stephen.walton at csun.edu
Thu May 27 16:45:45 CDT 2004


On Wed, 2004-05-26 at 16:01, Travis E. Oliphant wrote:
> Andrea Riciputi wrote:
> > 
> > Thanks, but my data set are typically 1024x1024 so I think I need FFT. 
> > Nevertheless I'll look into scipy for testing and verifying my own code.
> > 

> It could be as simple as
> 
> ifft2(fft2(a)*fft2(b))

I've got quite a bit of experience doing this with astronomical images. 
Travis is right about boundary issues;  you almost certainly want to
extend your images to twice their original size in each direction (four
times their original area) with the mean of your images.  In my case,
when I do this with full disk images of the Sun, I extend the image with
a model aureole to avoid edge effects.  This may be overkill.

All my code for doing this is in Fortran and built on top of the PORT
library FFT routines, so you probably don't want a copy.

-- 
Stephen Walton <stephen.walton at csun.edu>
Dept. of Physics & Astronomy, Cal State Northridge



More information about the SciPy-user mailing list