Deblink pupil data with the option to extend blinks before and after blink detection. See https://dr-jt.github.io/pupillometry/ for more information.

pupil_deblink(x, extend = 0, plot = FALSE, plot_trial = "all")

Arguments

x

dataframe.

extend

How many milliseconds to extend blinks before and after blink detection.

plot

Logical. Inspect a plot of how pupil values changed?

plot_trial

what trial(s) to plot. default = "all"

Output

Changes values in column containing pupil data.

Plot inspection

To inspect how the preprocesing step changed pupil size values, use `plot = TRUE`.

Warning: this will create a separate plot for every trial and therefore can be time consuming and overwhelming. The plot argument is meant for initial exploratory steps to determine the appropriate preprocessing parameters.