bandstop_filter {fMRItools}R Documentation

Bandstop filter

Description

Filter out frequencies within a given range using a Chebyshev Type II stopband. Essentially a convenience wrapper for the cheby2 function.

Usage

bandstop_filter(X, TR, f1, f2, Rs = 20)

Arguments

X

A numeric matrix, with each column being a timeseries to apply the stopband filter. For fMRI data, X should be T timepoints by V brain locations.

TR

The time step between adjacent rows of x, in seconds

f1, f2

The frequency limits for the filter, in Hz. f1 < f2

Rs

The amount of attenuation of the stopband ripple, in dB

Value

The filtered data

Examples

if (requireNamespace("gsignal", quietly=TRUE)) {
 n_voxels = 1e4
 n_timepoints = 100
 X = cbind(arima.sim(n=100, list(ar=.6)), arima.sim(n=100, list(ar=.6)))
 Y = bandstop_filter(X, .72, .31, .43)
}

[Package fMRItools version 0.4.2 Index]