plot_pulse {DecomposeR}R Documentation

Visualise the instantaneous frequencies and amplitudes of a decomposition

Description

Visualise the instantaneous frequencies and amplitudes of a decomposition

Usage

plot_pulse(
  pulse,
  style = "b",
  breaks = 500,
  bins = 100,
  cut = 18,
  lines = NULL,
  keep = NULL,
  lose = NULL
)

Arguments

pulse

a pulse object (created by inst.pulse or as.pulse)

style

whether to plot the distribution of frequency ('d'), the spectral population ('p') or both ('b', is the default)

breaks, bins, cut

parameter for the plots: breaks is fed to plot_hist, bins is fed to plot_hex, and cut defines the number of color cuts for plot_hex. For better control use plot_hist and plot_hex directly.

lines

the period of lines to be added to the plots for better visualisation

keep, lose

which modes to plot or to not (keep overrides lose)

Examples

set.seed(42)

n <- 600
t <- seq_len(n)

p1 <- 30
p2 <- 240

xy <- (1 + 0.6 * sin(t*2*pi/p2)) * sin(t*2*pi/p1)  + 2 * sin(t*2*pi/p2) +
  rnorm(n, sd = 0.5) + t * 0.01

inter_dt <- round(runif(length(xy), min = 0.5, max = 1.5),1)

dt <- cumsum(inter_dt)
dec <- extricate(xy, dt, nimf = 7, sifting = 10, repl = 10, comb = 10,
                 factor_noise = 10, speak = TRUE)

## Not run: 
plot_emd(dec, dir = tempdir())
## End(Not run)


integrity(xy, dec)
parsimony(dec)

ht   <- inst.pulse(dec, plot = FALSE)

plot_pulse(ht, lines = c(30, 240))


[Package DecomposeR version 1.0.6 Index]