Skip to contents

The intended use of this method is for smoothing, although by specifying wp and ws differently one can achieve highpass or bandpass filtering as well. However, only lowpass filtering should be done on pupillometry data.

Usage

lpfilt(eyeris, wp = 4, ws = 8, rp = 1, rs = 35, plot_freqz = FALSE)

Arguments

eyeris

An object of class eyeris derived from load().

wp

The end of passband frequency in Hz (desired lowpass cutoff).

ws

The start of stopband frequency in Hz (required lowpass cutoff).

rp

Required maximal ripple within passband in dB.

rs

Required minimal attenuation within stopband in dB.

plot_freqz

Boolean flag for displaying filter frequency response.

Value

An eyeris object with a new column in timeseries: pupil_raw_{...}_lpfilt.

Examples

system.file("extdata", "memory.asc", package = "eyeris") |>
  eyeris::load_asc() |>
  eyeris::deblink(extend = 50) |>
  eyeris::detransient() |>
  eyeris::interpolate() |>
  eyeris::lpfilt(plot_freqz = TRUE) |>
  plot(seed = 0)