eegprep.eeg_interp#
- eegprep.eeg_interp(EEG, bad_chans, method='spherical', t_range=None, params=None, dtype='float32')#
Interpolate missing or bad EEG channels using spherical spline.
interpolation.
Parameters#
- EEGdict
EEG data structure with ‘data’, ‘chanlocs’, ‘nbchan’, etc.
- bad_chanslist, array-like, or list of dicts
Channel names, channel indices, or channel-location dictionaries. When channel-location dictionaries are provided, the function can return unchanged data for identical locations, append new channels when no existing locations overlap, or remap data when existing channels are a subset of the requested channel structure.
- methodstr, optional
Interpolation method (‘spherical’, ‘sphericalKang’, ‘sphericalCRD’, ‘sphericalfast’, ‘invdist’/’v4’, or ‘spacetime’).
- t_rangetuple, optional
Time range for interpolation
- paramstuple, optional
Method-specific parameters
- dtypestr or dtype, optional
Precision for the interpolation computation. Use
"float32"to match MATLAB-oriented workflows with lower memory use, or"float64"for full precision.
Returns#
- EEGdict
Updated EEG structure with interpolated channels