I'm trying to calculate the Fourier transform of non periodical data in python, with non periodical I mean this. Usually we use have periodical data:
x=[0,1,2,3,4,5,6,7]
y=[1,0,2,0,1,0,1,0]
And the Fourier transform and the frequency domain can be obtained easily,
from scipy.fft import fft, fftfreq, fftshift
f=fftfreq(len(x), dx)
fy=fft(y)
And with that we can easily calculate the Fourier transform using scipy fft
, but in the case our data is not exactly periodical, for example,
x=[0,1,1.5,1.7,3,4,5...]
y=[...]
Anyone have some idea of how can be possible to obtain the Fourier transform using python if it's possible, or the mathematics principles that are used.