4.1. Discrete Fourier Transfer¶
import numpy as np
import matplotlib.pyplot as plt
import spkit as sp
4.1.1. Analysis¶
X,fs, ch_names = sp.data.eeg_sample_14ch()
x = X[:,1]
t = np.arange(len(x))/fs
mX, pX, N = sp.dft_analysis(x, window='boxcar')
print(mX.shape,pX.shape, N)
4.1.2. Synthesis¶
y = sp.dft_synthesis(mX, pX, M=N, window='boxcar')