I have done a Fourier transformation of two signals (in time) $S_1(t),S_2(t)$ using numpy's fft which will give me $S_1(f),S_2(f)$. The corresponding frequency grid I get via fftfreq. In the frequency space, I then interpolated the two signals to a new grid using interp1d. I need to do this to match the two grids of the signals so that I can divide them at the correct frequencies. However, I now want to transform the divided property $S_1(f)/S_2(f)$ back to time space using ifft. But: How do I get the new time grid?

  • 1
    $\begingroup$ You can probably use the chirp z-transform to directly transform to the frequency grid you need. For a Python implementation, check gist.github.com/endolith/2783807 $\endgroup$ – AlexE Apr 25 '14 at 9:13

By interpolating in frequency you are extending the length of your signal in time. You haven't done anything to increase your sampling rate so $\Delta t$ is fixed. Your new time grid will be of length N+M where N is the original length and M is the number of points added through interpolation.

Are you uniformly interpolating your frequency domain signal or just interpolating at a few points?

  • $\begingroup$ I am uniformly interpolating the frequency grid. The sampling rate is still fixed, even if I change $\Delta f$, the distance between the frequency points, due to the interpolation? $\endgroup$ – DaPhil Apr 28 '14 at 6:14
  • $\begingroup$ Yes, the sampling rate $\Delta t$ is fixed, an increase in frequency resolution, that is a smaller $\Delta f$, increases the length of your time-domain signal. It is common to zero-pad a time-domain signal for improved frequency resolution. To answer your question, your new time grid is t = (N+M-1)*$\Delta t$ $\endgroup$ – user7257 Apr 28 '14 at 14:21

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.