powered by
Filter out frequencies within a given range using a Chebyshev Type II stopband. Essentially a convenience wrapper for the cheby2 function.
cheby2
bandstop_filter(X, TR, f1, f2, Rs = 20)
The filtered data
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.
X
T
V
The time step between adjacent rows of x, in seconds
x
The frequency limits for the filter, in Hz. f1 < f2
f1 < f2
The amount of attenuation of the stopband ripple, in dB
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) }
Run the code above in your browser using DataLab