Description Usage Arguments Details Value Note Author(s) See Also Examples

View source: R/rendering_and_plotting.R

This function prepares results from the Hilbert transform of EMD or EEMD results for display using `HHGramImage`

.

1 2 |

`hres` |
This is the output generated by |

, or `CEEMD`

.

`dt` |
Time resolution of spectrogram. Must be greater than the sample rate of the time series to avoid gaps. |

`dfreq` |
Frequency resolution of spectrogram. |

`time.span` |
Time span to render spectrogram over; |

`freq.span` |
Frequency span to include in spectrogram; |

`scaling` |
If |

`combine.imfs` |
If |

`verbose` |
If |

`HHRender`

processes Hilbert spectral data prior to displaying with `HHGramImage`

.
`HHRender`

returns the ensemble Hilbert spectrogram if `combine.imfs = TRUE`

, otherwise it returns an IMF-by-IMF Hilbert spectrogram of dimensions `[time, freq, imf]`

.
The user can then choose which IMFs to plot when he or she calls `HHGramImage`

, but this makes `HHGramImage`

run about 40x slower on my machine.
The trade off is in speed versus flexibility for `HHGramImage`

; the `combine.imfs`

option does not affect `HHRender`

very much.

`hgram` |
A data structure containing the spectrogram image and other information required by |

The `HHRender`

function also keeps track of which trial contributes what data to the spectrogram.
For the EMD, this does not make much sense, because there is only one trial.
However, when `HHRender`

is run on EEMD results, it remembers which time/frequency bin gets data from each trial.
This is a way to distinguish between noise and signal in data: signal is where multiple trials contribute data to the same time/frequency bin,
noise is where only one (or a couple) of trials contribute data.
See options for `HHGramImage`

for ways to plot data based on signal stability.

Daniel Bowman [email protected]

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | ```
data(PortFosterEvent)
trials <- 10
nimf <- 10
noise.amp <- 6.4e-07
trials.dir <- "test"
set.seed(628)
#Run EEMD (this may take some time)
## Not run: EEMD(sig, tt, noise.amp, trials, nimf, noise.amp, trials.dir <- trials.dir)
#Compile the results
## Not run: EEMD.result <- EEMDCompile(trials.dir, trials, nimf)
#Calculate spectrogram
dt <- 0.1
dfreq <- 0.1
## Not run: hgram <- HHRender(EEMD.result, dt, dfreq)
#Plot spectrogram
time.span <- c(5, 10)
freq.span <- c(0, 25)
amp.span <- c(1e-6, 2.5e-5)
## Not run: HHGramImage(hgram, time.span = time.span,
freq.span = freq.span, amp.span = amp.span)
## End(Not run)
``` |

hht documentation built on May 29, 2017, 9:26 a.m.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.