How do I get the corresponding frequency values to my data after FFT?

  arrays, continuous-fourier, fft, numpy, python

I have the following dataset in normal space, lets call it func:enter image description here
I transformed it to fourierspace using the numpy fft algorithm from numpy.fft import fft as fourier, I received the fouriertransform usingfunc_fourier = np.fft.fftshift(fourier(func)) and plotted the absolute values plt.plot(np.abs(func_fourier)), what results in the following plot:enter image description here.

I now want to fit a gaussian model to this function in fourierspace. The problem is, that I dont have x-values(frequencies) that I could plot my func_fourier over. How do I create the correct frequency array in fourierspace, which I also need for fitting the gaussian model to my transformed function ?

Source: Python Questions

LEAVE A COMMENT