ep.eye_initialize: Initialize an ep.eye object

View source: R/ep.eye_initialize.R

ep.eye_initializeR Documentation

Initialize an ep.eye object

Description

This is a generic function for initializing an ep.eye object and performing basic internal checks on the eye data, while remaining agnostic to task/behavior structure.

Usage

ep.eye_initialize(
  file,
  config,
  expected_edf_fields = c("raw", "sacc", "fix", "blinks", "msg", "input", "button",
    "info", "asc_file", "edf_file"),
  task = NULL,
  id = NULL,
  gaze_events = c("sacc", "fix", "blink"),
  confirm_correspondence = FALSE,
  meta_check = NULL,
  inherit_btw_ev = NULL,
  header = NULL,
  ...
)

Arguments

file

Path to a single .edf file using read_edf().

config

configuration list

expected_edf_fields

Character vector of field names to enforce during initialization.

task

Character value with task name.

id

Numeric value with subject ID

gaze_events

Character vector of field names to unify with ep.eye_unify_gaze_events().

confirm_correspondence

Logical. Check for exact correspondence of unified gaze events stored in ep.eye$raw and ep.eye$sacc/fix/blink.

meta_check

List with $meta_vars, $meta_vals, and/or $recording_time fields.

inherit_btw_ev

List of between event message configurations to check/move to within. Can contain $calibration_check and $move_to_within elements.

Value

ep.eye. A single list object of class ep.eye, that has been read in, initialized, and integrated into the experiment.pipeline eye structure. Contains fields

Note

# TODO perhaps even store key variables (e.g. some measure of pupil fluctuation, or saccade velocity/acceleration) from prior subjects in separate circumscribed csv (which values get appended to) and plot distributions for every new subject. This would be akin to constructing a sort of empirical null distribution and performing informal (visual)"hypothesis tests" where we would hope certain variables in a given subject are not "significantly different" than the group distribution. Also this could include validation/ computing very basic data quality (large variance in gaze distribution, excessive blinks, large jumps in eye position, etc).

Author(s)

Nate Hall


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