I need to perform an inverse Fourier transform of this set of data, which is in the frequency domain (the x-axis is in $\mu$Hz).

However, I'm having two doubts $-$ firstly, this spectral spacing is not constant and varies from point to point. How can I perform an IFT in this situation? Secondly, the peaks of the IFT I have attempted are not where I expect them to be.

I have thought about interpolating the data, defining a spectral spacing of $1 \mu$Hz and then building a table with the interpolating function evaluated at each point. Then I computed the FT of these values.

Data = Import["https://pastebin.com/raw/up6CxYg4"];

DataF = Interpolation[Data];

A = Table[{i, DataF[i]}, {i, Data[[1, 1]], Data[[Length[Data], 1]], 

n = Length[A];

\[CapitalDelta]\[Nu] = 1*10^(-6);

\[CapitalDelta]t = 1/(n*\[CapitalDelta]\[Nu]);

FFT = Abs[InverseFourier[A[[All, 2]]]];

Time = Table[\[CapitalDelta]t*(i - 1), {i, 1, n}];

FT = Transpose[{Time, FFT}];

However, I am expecting the inverse FT to have a peak around 2000s, and another around 800s. This does not happen. Instead, the peaks I have are located at $\approx 331$ s and $\approx 1325.8$s.

What am I doing wrong? Thanks.

  • $\begingroup$ One issue is that the not only is the frequency data irregularly spaced, but it starts at 1116 and proceeds to 4132. To really take an IFFT you'll need values at all frequencies between 0 to the highest. I guess you could assume these are zero -- certainly it will change your axes considerably. $\endgroup$ – bill s Nov 6 '18 at 0:51
  • $\begingroup$ Thanks for your reply. I have assumed that for frequencies below 1116 all values are zero. But that hasn't changed my results greatly... $\endgroup$ – Sth99 Nov 6 '18 at 11:59
  • $\begingroup$ Please update your code to include all the frequencies. Recognize that this changes the n value significantly and hence the values in the Time vector. $\endgroup$ – bill s Nov 6 '18 at 14:57

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.