wignerTransform: Calculate the Wigner-Ville Transform of a Signal

View source: R/wignerTransform.R

wignerTransformR Documentation

Calculate the Wigner-Ville Transform of a Signal

Description

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.

Usage

wignerTransform(signal, n = NULL, sr, plot = FALSE)

Arguments

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

Details

This code mostly follows Pamguard's Java code for computing the Wigner-Ville and Hilbert transforms.

Value

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.

Author(s)

Taiki Sakai taiki.sakai@noaa.gov

Examples

clickWave <- createClickWave(signalLength = .05, clickLength = 1000, clicksPerSecond = 200,
                             frequency = 3e3, sampleRate = 10e3)
wt <- wignerTransform(clickWave@left, n = 1000, sr = 10e3, plot=TRUE)


PAMmisc documentation built on June 22, 2024, 9:37 a.m.