downsample_physio: downsample_physio

View source: R/physio_functions.R

downsample_physioR Documentation

downsample_physio

Description

This function reduces the

Usage

downsample_physio(
  ep.physio,
  downsample_factor = 1,
  digital_channels = c("ttl_code", "ttl_onset", "Digital.*"),
  method = "subsample"
)

Arguments

ep.physio

An ep.physio object created by read_acq

downsample_factor

An integer factor used to subsample data

digital_channels

Column names or positions containing digital channels, These will be downsampled using the downsample_digital_timeseries function to use the within-chunk mode, rather than blind subsampling.

method

How to downsample the signal. The default is "subsample", which simply takes every nth sample from the original time series. The alternative is "decimate", which calls signal::decimate. This applies a low-pass filter before downsampling to avoid aliasing. At the moment, there are big ringing artifacts at the beginning...


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