PlotIMFs: Display IMFs

View source: R/rendering_and_plotting.R

PlotIMFsR Documentation

Display IMFs

Description

This function displays IMFs generated using Sig2IMF, EEMDCompile. or EEMDResift

Usage

PlotIMFs(sig, time.span = NULL, imf.list = NULL, original.signal = TRUE, 
    residue = TRUE, fit.line = FALSE, lwd = 1, cex = 1, ...)

Arguments

sig

Data structure returned by Sig2IMF, EEMDCompile, or EEMDResift.

time.span

Time span over which to plot IMFs. NULL will draw the entire signal.

imf.list

Which IMFs to plot, NULL plots all of them.

original.signal

whether or not to plot the original signal.

residue

whether to plot the residue of the EMD method.

fit.line

whether to add a red line to the original signal trace showing how much of the original signal is contained in the selected IMFs and/or residual.

lwd

Line weight.

cex

Text size.

...

Pass additional graphics parameters to IMF plotter

Details

This function plots the IMF decomposition of a signal. It can show the original signal and also the residue left over when the IMFs are removed from the signal. The plotter can use data from both EMD and EEMD runs. When it plots EEMD data, it shows the averaged IMFs from the trials processed by EEMDCompile.

Note

It is very important to inspect the IMF set prior to rendering Hilbert spectrograms. Oftentimes, problems with the EMD are obvious when the IMFs are plotted. The fit.line option can help with this.

Author(s)

Daniel Bowman danny.c.bowman@gmail.com

See Also

HHGramImage

Examples

data(PortFosterEvent)

#Run EMD
emd.result <- Sig2IMF(sig, tt, sm = "polynomial")

#Plot the first 4 IMFs of the EEMD of a signal.
time.span <- c(5, 10)
imf.list <- 1:4
original.signal <- TRUE
residue <- TRUE

PlotIMFs(emd.result, time.span, imf.list, original.signal, residue)

#Check how much contribution IMFs 2 and 3 make to the complete signal
imf.list <- c(2, 3)
fit.line <- TRUE
PlotIMFs(emd.result, time.span, imf.list, original.signal, residue, fit.line)

hht documentation built on March 31, 2023, 10:08 p.m.

Related to PlotIMFs in hht...