ep.eye_preprocess_pupil: Preprocess Pupil Data

View source: R/ep.eye_preprocess_pupil.R

ep.eye_preprocess_pupilR Documentation

Preprocess Pupil Data

Description

This function preprocesses pupil data by extending blinks, filtering, interpolating, performing baseline correction, and downsampling the data.

Usage

ep.eye_preprocess_pupil(
  ep.eye,
  config,
  blink_corr,
  filter,
  interpolate,
  baseline_correction,
  downsample,
  header = NULL
)

Arguments

ep.eye

A data object containing eye-tracking information.

config

config

blink_corr

A list containing parameters for blink correction: 'ms_before' and 'ms_after' specifying the milliseconds before and after a blink to be corrected.

filter

A list containing parameters for filtering: 'method' and 'window_length' specifying the method and window length for filtering.

interpolate

A list containing parameters for interpolation: 'algor' and 'maxgap' specifying the algorithm and maximum gap for interpolation.

baseline_correction

A list containing parameters for baseline correction: 'method', 'dur_ms', and 'center_on' specifying the method, duration in milliseconds, and the centering method for baseline correction.

downsample

A list containing parameters for downsampling: 'downsampled_freq' and 'method' specifying the downsampled frequency and method for downsampling.

header

An optional header parameter. If NULL, no header is used.

Value

A data object containing the preprocessed pupil data.

Examples

# Assuming `ep.eye`, `blink_corr`, `filter`, `interpolate`, `baseline_correction`, and `downsample` are defined:
preprocessed_data <- ep.eye_preprocess_pupil(ep.eye, blink_corr, filter, interpolate, baseline_correction, downsample)

PennStateDEPENdLab/experiment_pipeline documentation built on Nov. 27, 2024, 4:56 a.m.