Detection with Pupil Sizes

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:

DataFrame | tuple[DataFrame, ndarray]