FFT-based Resampling

Description

This module implements FFT-based resampling for EEG data. The fft_resample function uses the Fast Fourier Transform (FFT) to resample the input signals to a new sampling frequency, maintaining the spectral properties of the signal.

Function

bciflow.modules.tf.resample_fft.fft_resample(eegdata, new_sfreq)[source]
Parameters:
  • eegdata (dict) – A dictionary containing the EEG data, where the key ‘X’ holds the raw signal and ‘sfreq’ holds the original sampling frequency.

  • new_sfreq (float) – The new sampling frequency to which the data will be resampled.

Returns:

The same dictionary passed in parameters, but with the resampled data stored under the key ‘X’ and the new sampling frequency under the key ‘sfreq’.

Return type:

dict

The implementation uses the scipy.signal.resample function, which performs FFT-based resampling. For more details on resampling techniques, refer to:
  • Smith, S. W. (1997). The Scientist and Engineer’s Guide to Digital Signal Processing. California Technical Publishing.

  • Oppenheim, A. V., & Schafer, R. W. (2010). Discrete-Time Signal Processing. Pearson.