I have a pretty gruesome expression of which I need to do the inverse Fourier transform twice (over two coordinates ($\omega$ to $t$ and $q$ to $r$)).

$f(q,\omega)= \frac{ 2 \sqrt{\pi} \sqrt{\frac{d_2}{\gamma_2-i \omega}} \sqrt{\frac{d_2}{2 \gamma_2-2 i \omega}} (q^2 (d_2-d_1)-\gamma_1+\gamma_2) \left(e^{- \frac{R \left(1+i q \sqrt{\frac{d_2}{\gamma_2-i \omega}}\right)} {\sqrt{\frac{d_2}{\gamma_2-i \omega}}}} -1 \right) } {d_2 \left(-1-i q \sqrt{\frac{d_2}{\gamma_2-i \omega}}\right) (d_2 q^2+\gamma_2-i \omega)} + \frac{1}{d_2 q^2+\gamma_2-i \omega}$

It is too complicated to handle for Mathematica's built-in InverseFourierTransform, so I am doing it numerically.

I'm experimenting with doing first $\omega$ then $q$ and vice versa to see if one is better behaved than the other, but in both cases, my issue is that the result of the first IFT is highly oscillatory.

Now here comes the question. It looks like there is an underlying well-behaved shape to the result and that the peaks are numerical errors (though not 100% sure about that). I would like a way to smooth out the result to this underlying shape (see picture). Setting the InterpolationOrder to a lower value did some of it, but it is still very un-smooth. enter image description here

Is there a way to do this, or it is a tailored procedure for each case? And if there is a better way to deal with this IFT than what I'm doing, I'd be grateful for any suggestions.

Edit added code:

The code I used is the following:

table = ParallelTable[
   {{q, t}, 
    1/Sqrt[2 Pi] NIntegrate[Exp[-I w t] f[q, w] /. {d1 -> 0.1, d2 -> 0.2, gamma1 -> 0.1, gamma2 -> 0.2, R -> 0.7}, 
      {w, -Infinity, Infinity}, 
      MaxRecursion -> 25]}
  {q, -qgrid, qgrid, res}, {t, 0, tgrid, res}

finterpolation = Interpolation[Flatten[table, 1], InterpolationOrder -> 3];

Where qgrid, tgrid, and res are values I'm playing with to get a better result. For example, it seems that the function is very oscillatory for $t<5$, but smooth after, so I'm thinking of doing the integral for $t>5$ and interpolating back down to lower values.

  • $\begingroup$ Where is your try in Mathematica? $\endgroup$ – zhk Feb 28 '17 at 14:14
  • $\begingroup$ First, your f is the sum of two terms so you can do the two separately. Is it possible the smooth bell shaped part of your plot is the FT of the 1/(-i w) and the peaks are the FT of the e^() term? $\endgroup$ – bill s Feb 28 '17 at 14:22
  • $\begingroup$ MMM> I have added my code. bill s> I will have a look at that! $\endgroup$ – Kaspar H Feb 28 '17 at 14:28
  • $\begingroup$ Have a look at GaussianFilter $\endgroup$ – AccidentalFourierTransform Feb 28 '17 at 14:35
  • $\begingroup$ @bills It did indeed do the trick to simply divide up in sums! $\endgroup$ – Kaspar H Mar 15 '17 at 13:07

Observe that your f is the sum of two terms, so you can do the FT of the two terms separately (this is the linearity property of the FT). Most likely, the smooth bell shaped part of your plot is the FT of the 1/(-i w) term and the peaks are the FT of the E^() term. By separating it should be possible to get a clearer view of what is happening. When dealing with the FT, it's always a good idea to look at the basic properties of the transform (as in the above link)!


Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.