Skip to contents

The function topfreq calculates the single main frequency for voltage time series data using the Fast Fourier Transform.

Usage

topfreq(data, window = TRUE, filter = 0.25, pre_fft = FALSE)

Arguments

data

Either a voltage time series dataframe or a dataframe of Fourier transformed data with columns for frequency and amplitude. If the latter, change pre_fft to TRUE.

window

Default true will window the data before transforming.

filter

High pass filter indicating threshold frequency above which will be kept, and below which will be filtered out

pre_fft

TRUE/FALSE indicating whether or not the data being fed has been Fourier Transformed,

Value

The single main frequency and its amplitude is returned as a tibble object.

Details

The main frequency is defined as that which has the largest amplitude.

See also

Other frequency related functions: mainfreqs(), plot_fbox(), plot_fft(), single_fft(), wave_topfreq()