Detection with Pupil Sizes
- eyefeatures.preprocessing.blinks_extraction.detect_blinks_pupil_vt(pupil_signal, timestamps, Fs, gap_dur=20, min_dur=20, remove_outliers=False, window_len=None, min_pupil_size=2, min_separation=50, return_mask=False)[source]
Method detects blinks based on pupil sizes and change of pupil sizes.
- Parameters:
pupil_signal (ndarray) – size of right of left pupil, mm.
timestamps (ndarray) – data recording timestamps, ms.
Fs (int) – sample rate of eye tracker, Hz.
gap_dur (int) – max gaps between periods of data loss, ms.
min_dur (int) – min duration of blink, ms.
remove_outliers (bool) – whether to remove outliers.
window_len (int) – size of window to use if ‘remove_outliers’ = True.
min_pupil_size (int) – min value of pupil size considered to be recorded correctly, mm.
min_separation (int) – min time interval between detected blinks, ms.
return_mask (bool) – if True, then mask showing blink classification is also returned.
- Returns:
detected blinks dataframe.
- Return type: