I have the following dataset in normal space, lets call it `func`

:

I transformed it to fourierspace using the numpy fft algorithm `from numpy.fft import fft as fourier`

, I received the fouriertransform using`func_fourier = np.fft.fftshift(fourier(func))`

and plotted the absolute values `plt.plot(np.abs(func_fourier))`

, what results in the following plot:.

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