event_lock_ts: function to get interpolated event locked data

View source: R/event_lock_timeseries.R

event_lock_tsR Documentation

function to get interpolated event locked data

Description

function to get interpolated event locked data

Usage

event_lock_ts(
  fmri_obj,
  event = NULL,
  time_before = -3,
  time_after = 3,
  collide_before = NULL,
  collide_after = NULL,
  pad_before = -1,
  pad_after = 1,
  time_audit = FALSE
)

Arguments

fmri_obj

An fmri_ts object containing time series data that are optionally keyed on one or more grouping variables (e.g., ROI). The fmri_obj must also contain trial-level data (in the $event_data field) for event-locking to proceed.

event

Name of column in fmri_obj$event_data that identifies onset for event of interest

time_before

How many seconds before the event do we want data. Default: -3

time_after

How many seconds after the event do we want data. Default: 3

collide_before

An optional vector of column names in trial_df that set a boundary on the earliest time point used in interpolation. This effectively truncates the time series for interpolation to a smaller window than specified by time_before.

collide_after

An optional vector of column names in trial_df that set a boundary on the latest time point used in interpolation. This effectively truncates the time series for interpolation to a smaller window than specified by time_after.

pad_before

Number of seconds to include in the epoch time window before the event of interest. Interpolation spans the window from time_before to time_after, but padding includes data points at the boundary that can help to have sufficient data to interpolate early and late times within the epoch.

pad_after

Number of seconds to include in the epoch time window after the event of interest.

time_audit

If TRUE, additional columns will be added to the output showing how alignment is calculated vis-a-vis event timing

logfile

Name of log file containing event-locking problems


UNCDEPENdLab/fmri.pipeline documentation built on April 3, 2025, 3:21 p.m.