mne.preprocessing.eyetracking.interpolate_blinks#
- mne.preprocessing.eyetracking.interpolate_blinks(raw, buffer=0.05, match='BAD_blink', interpolate_gaze=False)[source]#
Interpolate eyetracking signals during blinks.
This function uses the timing of blink annotations to estimate missing data. Operates in place.
- Parameters:
- rawinstance of
Raw
The raw data with at least one
'pupil'
or'eyegaze'
channel.- buffer
float
| array_like offloat
, shape(2,))
The time in seconds before and after a blink to consider invalid and include in the segment to be interpolated over. Default is
0.05
seconds (50 ms). If array-like, the first element is the time before the blink and the second element is the time after the blink to consider invalid, for example,(0.025, .1)
.- match
str
|list
ofstr
The description of annotations to interpolate over. If a list, the data within all annotations that match any of the strings in the list will be interpolated over. Defaults to
'BAD_blink'
.- interpolate_gazebool
If False, only apply interpolation to
'pupil channels'
. If True, interpolate over'eyegaze'
channels as well. Defaults to False, because eye position can change in unpredictable ways during blinks.
- rawinstance of
- Returns:
- selfinstance of
Raw
Returns the modified instance.
- selfinstance of
Notes
New in v1.5.
Examples using mne.preprocessing.eyetracking.interpolate_blinks
#
Working with eye tracker data in MNE-Python
Plotting eye-tracking heatmaps in MNE-Python