Reputation: 141
I am receiving data from a vibration sensor in the form of two numpy arrays. The first array represents the actual values for the vibration measurement and the second array is the corresponding time information (timestamp). For example:
vibraton_data = np.array([621,1546,262])
timestamps = np.array([1592583531, 1592583548, 1592583555])
That means that for every vibration measurement I have the time information.
I would like to apply now the Fast-Fourier-Transformation. Does anyone know how to do that? My first try would be something like this:
N = 600
T = 1.0 / 800.0
x = np.linspace(0.0, N*T, N)
yf = fft(vibration_data)
xf = np.linspace(0.0, 1.0/(2.0*T), N/2)
But I dont know here how to deal with the time information from my time array.
Upvotes: 0
Views: 768
Reputation: 11047
This is really a signal processing question, not a Python one. You have several options here:
In all cases, when you perform FFT, time information is not required anymore, as you are in the frequency domain.
Upvotes: 2