eeg_interp#
- eeg_interp(EEG, bad_chans, method='spherical', t_range=None, params=None, dtype=None)#
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 spherical-spline computation. The default follows the floating-point dtype of
EEG['data'], and usesfloat64when the data are not floating point. Pass"float32"for the lower-memory path.
Returns#
- EEGdict
Updated EEG structure with interpolated channels