I am not from Physics or electrical engineering, so the answers I read related to my only confused me the more. So I asked this case-specific question.
I work with a sensor data (time series). The data consists of sensor values for 4 quantities (4 features), captured at 1 sample per second (1 sec) rate.
I segmented the data into fixed-size samples of 200 time-steps. This data is in time-domain, so I want to obtain the its frequency-domain equivalent. Here's a MWE of how the input data is represented:
import numpy as np
from scipy.fft import fft, fftfreq
X = np.random.rand(5, 200, 4) # 5 samples in this case,
X_fft = fft(X, axis=1) # fft along each dimension of my input (4 features)
magnitude = np.abs(X_fft)
Questions
- Does the magnitude calculated above represent the
frequency-domainequivalent of mytime-domaininput? - If answer to 1 is NO, how then do I obtain the
frequency-domain? - What is the difference between
magnitudeandspectrum power?