evt_align_decon_files: Align a set of deconvolved time series files to an event of...

View source: R/event_lock_timeseries.R

evt_align_decon_filesR Documentation

Align a set of deconvolved time series files to an event of interest function.

Description

Align a set of deconvolved time series files to an event of interest function.

Usage

evt_align_decon_files(
  d_files,
  trial_df,
  alignment = list(),
  aggregate_by = "atlas_value",
  tr = NULL,
  atlas_cuts = NULL,
  atlas_subset = NULL,
  out_file = NULL,
  ncpus = 8,
  time_audit = FALSE
)

Arguments

d_files

A vector of deconvolved .csv.gz files created by voxelwise_deconvolution.

trial_df

The trial-level data.frame containing id and run for each subject represented in d_files.

alignment

A list containing alignment details passed to get_medusa_interpolated_ts

aggregate_by

The column name in the individual deconvolved files used for averaging repeated units (e.g., voxels) into single event-aligned time series. Most commonly, this is "atlas_value", which will lead to averaging of voxels within each parcel in the mask.

tr

The repetition time of the sequence in seconds.

atlas_cuts

For a continuous-valued atlas (e.g., containing a gradient of interest), a vector of cut points for binning values. These cuts are applied to the aggregate_by column, commonly "atlas_value"

atlas_subset

An optional numeric vector containing values of aggregate_by

out_file

The output file name (can include path) for the event-aligned csv file. If NULL, nothing is output (but the event-aligned data are always returned as a data.frame)

time_audit

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

Details

This is intended to be used internally by run_decon_alignment, which accepts a set of mask/atlas files and alignments, then processes these in parallel.


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