View source: R/blink_velocity.R
blink_velocity | R Documentation |
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
blink_mathot(
df,
neg_velocity_thresh = -5,
pos_velocity_thresh = 5,
fillback = 10,
fillforward = 10,
hz = 250
)
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 |
data frame containing pupil values where blinks have been linear interpolated.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.