[SciPy-User] Rotated, Anisotropic Gaussian Filtering (Kernel Density Estimation)
Fri Oct 19 14:29:35 CDT 2012
On Fri, Oct 19, 2012 at 7:18 PM, Patrick Marsh <firstname.lastname@example.org> wrote:
> Obviously, I'm doing something wrong here, but I'm not sure what. Why is the
> result separated into the four corners and not the center of the grid?
As it was said before, you are not doing anything wrong, that is the
expected behaviour. According to the standard specification the first
element of the array is the mean value.
The details are here:
Also, you could take advantage of the fact that both the kernel and
the data are real, therefore the negative frequencies are trivial, and
you only need the positive ones. np.fft has rfft functions for these
cases, the signal package may have something useful too.
Doing some research, it appears that FFTW is not included in Numpy, so
you may want to take a look at pyFFTW. I don't know the implementation
details of signal.fftconvolve, but you could clone it replacing their
fft with this faster library:
More information about the SciPy-User