Detection with Pupil Sizes and NaNs
- eyefeatures.preprocessing.blinks_extraction.detect_blinks_pupil_missing(pupil_signal, timestamps, min_separation=100, min_dur=20, smoothing_window_size=10, return_mask=False)[source]
Method detects blinks based on size of pupil and missing recordings (NaN) in its data. Result is boolean array of the same length as pupil_signal, with 1 indicating blink, 0 - not blink.
- Parameters:
pupil_signal (ndarray) – size of right or left pupil.
timestamps (ndarray) – data recording timestamps.
smoothing_window_size (int) – maximum size of smoothing window, ms.
min_separation (int) – min time interval between detected blinks, ms.
min_dur (int) – min duration of blink, ms.
return_mask (bool) – bool = False
- Returns:
detected blinks dataframe.
- Return type: