blink_velocity: This function takes a dataframe and applies velocity blink...

View source: R/blink_velocity.R

blink_velocityR Documentation

This function takes a dataframe and applies velocity blink algorithm to detect blinks in the data based off velocity of pupil size changes. The algorithm has four parameters that need to be adjusted based on the particulars of the data: the amount of smoothing, the (negative) onset velocity threshold, the (positive) reversal velocity threshold, and the temporal margin

Description

This function takes a dataframe and applies Mathot's (2013) blink algorithm to detect blinks in the data based off velocity of pupil size changes. The algorithm has four parameters that need to be adjusted based on the particulars of the data: the amount of smoothing, the (negative) onset velocity threshold, the (positive) reversal velocity threshold, and the temporal margin

Usage

blink_mathot(
  df,
  neg_velocity_thresh = -5,
  pos_velocity_thresh = 5,
  fillback = 10,
  fillforward = 10,
  hz = 250
)

Arguments

df

data frame.

neg_velocity_thresh

threshold for onset of blinks neg number here we use default of -5

fillback

extend blinks backward

fillforward

extend blinks forward

hz

recording frequency of ET

pos_velocity_thres

threshold for offset of blinks neg number here we use default of 5

Value

data frame containing pupil values where blinks have been linear interpolated.


dmirman/gazer documentation built on Aug. 1, 2022, 2:02 p.m.