Description Usage Arguments Value Examples
The function reads in a TDMS file and generates its Fast Fourier Transform (FFT). For the FFT calculation, we ignore the complex conjugates involved and only consider the Magnitudes of each complex number. After finding the frequency components, it returns a list of top frequencies based on specified n value
1 | fftprofile(data, frequencyPoints = 10000, n)
|
data |
is an TDMS file Input |
frequencyPoints |
corresponds to the number of points for FFT (integer) |
n |
corresponds to the number of Top Frequencies to be returned (integer) |
a list/vector of Top frequencies associated with the TDMS file data signal in the Frequency Domain
1 2 3 4 5 6 7 8 9 10 11 12 | # Load the installed library/package
library(readTDMS)
# Open the TDMS File with specified path
f <- file('~/readTDMS/vignettes/data/file.tdms', 'rb')
# Specify required parameters
frequencyPoints <- 10000
n <- 10
# Call the Function to get the top frequencies
ans <- fftprofile(f, frequencyPoints = frequencyPoints, n = n)
# Close the file if needed
# Note: For any changes and rerun of about function, we need to reopen the TDMS file
close(f)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.