dct_convert: DCT and frequency conversion

View source: R/DCT_FFT_detrending.R

dct_convertR Documentation

DCT and frequency conversion

Description

Convert between number of DCT bases and Hz of highpass filter

Usage

dct_convert(T_, TR, n = NULL, f = NULL)

dct2Hz(T_, TR, n)

Hz2dct(T_, TR, f)

Arguments

T_

Length of timeseries (number of timepoints)

TR

TR of the fMRI scan, in seconds (the time between timepoints)

n

Number of cosine bases

f

Hz of highpass filter

Details

Provide either n or f to calculate the other.

If only the total length of the scan is known, you can set that to TR and use T_=1.

f = n / (2 * T_ * TR)

Value

If n was provided, the highpass filter cutoff (Hz) is returned. Otherwise, if f was provided, the number of cosine bases is returned. The result should be rounded before passing to dct_bases


fMRItools documentation built on April 12, 2025, 1:32 a.m.