I am working with some time series data with a shape of 8064. The data is actually the popular EEG data called DEAP. It basically is a 3D array of size (40, 40, 8064) and here is the link to the official dataset website: https://www.eecs.qmul.ac.uk/mmv/datasets/deap/
I applied Welch in order to get the PSD (Power Spectral Density) of the data but the PSD result has a different shape. I was trying to figure out how Welch changes the shape of the data. Any ideas?
srate = 128 winsize = int( 2*srate ) # 2-second window hannw = .5 - np.cos(2*np.pi*np.linspace(0,1,winsize))/2 nfft = srate*100 # number of FFT points (frequency resolution) f, welchpow = scipy.signal.welch(data1, fs=srate, window=hannw, nperseg=winsize, noverlap=winsize/2, nfft=nfft)
As you can see in the code above, data1 is the original data and has a shape of (40, 40, 8064). After Applying the code above, welchpow will have a shape of (40, 40, 6401). I can't figure out how it actually changes the shape of the time series data from 8064 to 6401.