Description Usage Arguments Author(s)
dsa_fft
A function to compute the fft results for a time series (especially dense sampled behavioral data).
By default, dsa_fft will treat the data so that each column is considered one timepoint and computes all steps by row.
If your input data is organized with time = rows, change time argument to 'row'.
Both sampling frequency and desired frequency resolution (Bin width per frequency bin of FFT) needs to be in Hz.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 |
data |
requires the dataframe |
time |
are timepoints across columns or rows? default = "col" |
detrend |
Detrending the data (default = 'linear', also available: 'dc', '2ndorder' or 'none') |
window |
Windowing whole time series (default = 'tukey', also available: 'hanning', 'none') |
scaling |
Rescaling the data (default: 'z' for z-transform, also available: 'none' ) |
padding |
Padding the data (default: 'zeros' for zero-padding, also available: 'mean', 'none') |
desired_res |
Padding the data up to desired_res (automatically evaluates necessary number of pads to achieve the resolution, default = 1) |
sfreq |
sampling frequency of inserted datapoints |
desired_out |
Extract amplitude values (default: 'amp', also available 'power' or 'logPower') |
single_sided |
Single-sided frequency spectum (default = T) |
out |
By default, output is Mod (Amplitude) of the signal. Change to 'arg' to get phase or 'complex' to get the complex output. |
alpha |
only for tukey window |
verbose |
T/F |
Rene Michel
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.