View source: R/wignerTransform.R
wignerTransform | R Documentation |
Calculates the Wigner-Ville transform a signal. By default, the signal will be zero-padded to the next power of two before computing the transform, and creates an NxN matrix where N is the zero-padded length. Note that this matrix can get very large for larger N, consider shortening longer signals.
wignerTransform(signal, n = NULL, sr, plot = FALSE)
signal |
input signal waveform |
n |
number of frequency bins of the output, if NULL will be the next power of two from the length of the input signal (recommended) |
sr |
the sample rate of the data |
plot |
logical flag whether or not to plot the result |
This code mostly follows Pamguard's Java code for computing the Wigner-Ville and Hilbert transforms.
a list with three items. tfr
, the real values of the wigner
transform as a matrix with n
rows and number of columns equal to the next
power of two from the length of the input signal. f
and t
the values of the frequency and time axes.
Taiki Sakai taiki.sakai@noaa.gov
clickWave <- createClickWave(signalLength = .05, clickLength = 1000, clicksPerSecond = 200,
frequency = 3e3, sampleRate = 10e3)
wt <- wignerTransform(clickWave@left, n = 1000, sr = 10e3, plot=TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.