Cubic Resampling
Description
This module implements cubic resampling for EEG data. The cubic_resample function uses cubic splines to resample the input signals to a new sampling frequency, providing smooth interpolation between data points.
Function
- bciflow.modules.tf.resample_cubic.cubic_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.interpolate.CubicSpline function, which performs cubic spline interpolation. For more details on interpolation techniques, refer to: - Press, W. H., Teukolsky, S. A., Vetterling, W. T., & Flannery, B. P. (2007). Numerical Recipes: The Art of Scientific Computing. Cambridge University Press.