0
$\begingroup$

I'm trying to perform a FFT of a 3D regular grid and then compute the bin average (in spherical shell bins) of the Fourier transformed grid.

The problem is that the resulted vector is very noisy as I'm averaging over just a few frequencies in each bin.

To correct this and get a smoother outcome, I tried zero-padding the initial grid before transforming since I've read that this equivalent to Sinc interpolation.

Now the problem is that I'm running out of memory.

Is there a way to perform the interpolation (Sinc or not) without zero padding? Let me also point out that this is a 3D FFT.

I'm doing the whole thing in Python.

Update

Let me try to simplify the question a bit:

You can ignore the spherical shell bin-averaging part.

I know that using zero-padding can increase the number of frequencies that you can get. However, this comes at the cost of increased memory usage. Due to the fact that I'm using 3D FFT (not just 1D) memory is a real issue.

So my question is: Can I have the benefits of zero-padding (many frequencies) without its computational burden by using some other method? (e.g. interpolation) And if so, then how?

$\endgroup$
4
  • $\begingroup$ Is it possible to add a bit more background information? What "figure" are you trying to plot? What sort of resolution would be acceptable? If you are zero padding the FFT and then average its output, why don't you run an FFT with fewer points from the start? $\endgroup$ – A_A Jun 4 '20 at 10:19
  • $\begingroup$ If I run the FFT with fewer points from the start I get fewer frequencies, therefore noise outcome when I bin those. How would reducing the number of points solve this? $\endgroup$ – Minas Karamanis Jun 4 '20 at 11:01
  • $\begingroup$ In 1 dimension: is this equivalent with what you are doing? x=randn(10,1); x2 = zeros(20,1); x2(1:2:end-1) = x; X = fft(x); X2 = fft(x2); X2b = mean(reshape(X2, 2, [])) $\endgroup$ – Knut Inge Jun 4 '20 at 11:23
  • $\begingroup$ Not exactly, the bin-averaging part is not important here. Please see the updated question. $\endgroup$ – Minas Karamanis Jun 4 '20 at 11:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.