ep.eye_downsample: Downsample gaze and/or pupil data

View source: R/ep.eye_preprocess_helpers.R

ep.eye_downsampleR Documentation

Downsample gaze and/or pupil data

Description

Downsample gaze and/or pupil data

Usage

ep.eye_downsample(
  df,
  sample.rate = 1000,
  downsampled_freq = 20,
  digital_channels = c("eventn", "saccn", "fixn", "blinkn", "block_trial"),
  analog_channels = c("xp", "yp", "ps"),
  char_channels = c("et.msg", "block", "event"),
  method = "mean"
)

Arguments

df

data.table to downsample (usually this is ep.eye$raw)

sample.rate

sampling rate of the eyetracker in Hz

downsampled_freq

Frequency of the downsampled data indicating degree of downsampling. It is important to be mindful of your sampling rate when selecting this value. Defaults to 20 (which moves a second of recording at 1000Hz to 20 measurements).

digital_channels

Character vector of columns in df that are integer values that should not be combined but blocked by.

analog_channels

Character vector of columns in df that are continually varying and should be summarized within the downsampling procdure (incl x and y gaze position and pupil size)

char_channels

Character vector of columns in df that represent values that should be combined if there are unique values within a downsampling block. If there are multiples within a downsampling block will paste them together with " || "

method

String "mean" or "subsample" determining whether to perform subsampling (keep every n measurement) or mean-based downsampling.


PennStateDEPENdLab/experiment.pipeline documentation built on April 14, 2024, 9:37 p.m.