mne.channels.compute_interpolation_data#
- mne.channels.compute_interpolation_data(info, *, origin='auto', mode='accurate', verbose=None)[source]#
Precompute data to speed up bad channel interpolation.
- Parameters:
- infoinstance of
Info The measurement info containing the channel positions.
- originarray_like, shape (3,) |
str Origin of the sphere in the head coordinate frame and in meters. Can be
'auto'(default), which means a head-digitization-based origin fit.- mode
str Either
'accurate'(default) or'fast', determines the quality of the Legendre polynomial expansion used for MEG.- verbosebool |
str|int|None Control verbosity of the logging output. If
None, use the default verbosity level. See the logging documentation andmne.verbose()for details. Should only be passed as a keyword argument.
- infoinstance of
- Returns:
- interpolation
dict Maps
'eeg'and/or'meg'(whichever channel types are present) toInterpolationDatainstances, for use as theinterpolationargument ofmne.io.Raw.interpolate_bads(),mne.Epochs.interpolate_bads(), ormne.Evoked.interpolate_bads().
- interpolation
Notes
The precomputed data does not depend on which channels are bad: for EEG it holds the spherical spline Legendre series evaluated between all pairs of sensors, and for MEG the lead field dot products between all pairs of sensors. It can thus be reused for any set of bad channels, e.g., when interpolating different channels in different epochs, as long as the sensor positions (and for MEG,
info['dev_head_t']) are unchanged.New in v1.14.