They call it Fast Fourier Transform

Memory Leaks in the python-numeric FFT module
At present, I'm doing 2d-FFTs on extracted movies 4000-6000 frames in length. Sadly, Python cancels the job after about 2000 frames citing segfaults or memory errors, as it's running out of 2GB each of RAM and swapspace...

KSysGuard serves as a primitive debugging tool here. Note that you actually have to kill Python to ultimately free your memory. The culprit was the fft2d function from the FFT module (comes with python-numeric). I didn't find any related issues online, so maybe it's just me. However, using fft2 from scipy.fftpack (Documentation here) resolves the issue. Computing times are more or less equal for both packages.

No comments: