I am trying to do an inverse FFT to get the real signal from a derived formula which describes the Fourier transformed signal. I am doing this with FFT.

I am fairly new to the theory of FFTs, so my questions may be naive.

Taking a modified equation for greens function for 3D diffusion \begin{equation} f(r,t) = \frac{r}{(4\pi D t)^{2/3}}e^{-\frac{r^2}{4Dt}-t/\tau} \end{equation} the Fourier transform with my convention (normalization $1/2\pi$ and negative exponent on the reciprocal-to-real transform) \begin{equation} \hat{f}(q,\omega) = \frac{1}{2\pi}\frac{iq}{-i\omega +Dq^2 + 1/\tau} \end{equation}

The function $f(r,t)$ is non-continuous and defined for positive values only (it's a radial function on $r$).

Now, when doing the FFT, I have understood that the forward FFT produces a complex conjugate result of positive and negative "frequencies." Therefore, when doing my inverse FFT, I am giving as input both negative and positive values of $q$ and $\omega$, evenly spaced around 0.

My question is, why the result in real space (plotted on $r$ axis) has both positive and negative values, and how to know which one to use?

The picture below shows the output of the FFT algorithm of $\hat{f}(q,\omega)$ as well as the analytical result $f(r,t)$. It is clear that the two peaks from the FFT can both be shifted/mirrored as appropriate to match exactly the analytical result, except for the peaks which I also cannot explain.

FFT and analytical

In my actual problem, I have a more complicated version of $\hat{f}$ which does not have an analytical expression in real space. This is why I am looking at the reverse FFT only. The FFT output is shown below.

FFT problem

Obviously there is a problem of some sort on the left peak, which is why I am thinking I need to shift and mirror the peak on the right. But this is all too handwaving for me, so I would greatly appreciate if someone could help me out.

  • $\begingroup$ have you performed fftshift? Is the spikes centered at DC value (center bin) after fftshift? $\endgroup$ – Zeeshan Jul 17 '17 at 11:53
  • $\begingroup$ There is no fftshift implemented in the library I use (Intel's MKL), but I can achieve the same by multiplying my input by $e^{i\pi n}$. When I do the shifting as explained, the spikes are at the center and maybe 1-2 bins to the left and right. What does this mean, and what would be the justification for doing that? The problem is that when doing shifting on figure 2, I get the problematic part (left on the figure) as the positive values, which makes me think I need to do a mirroring as well. Does this make sense? $\endgroup$ – Kaspar H Jul 18 '17 at 8:39

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.