Learn R Programming

hht (version 2.0.1)

FTGramImage: Display Fourier spectrogram

Description

This function displays a Fourier spectrogram using the same plot structure and options as HHGramImage. It uses the function EvolutiveFFT to generate a spectrogram, then wraps it in the same plotting format as HHGramImage.

Usage

FTGramImage(sig, dt, ft, time.span = NULL, freq.span = NULL, 
     amp.span = NULL, taper=0.05, scaling = "none", grid=TRUE, 
    colorbar=TRUE, backcol=c(0, 0, 0), colormap=NULL, pretty=FALSE, ...)

Arguments

sig
The signal to process
dt
sample rate
ft
Fourier spectrogram options
ft$ns is the number of samples in a window
ft$nov is the number of samples to overlap

Value

  • imgThe spectrogram image, suitable for plotting with the generic image function

item

  • time.span
  • freq.span
  • amp.span
  • taper
  • scaling
  • grid
  • colorbar
  • backcol
  • colormap
  • pretty
  • ...
  • img.x.format
  • img.y.format
  • colorbar.format
  • cex.lab
  • cex.colorbar
  • cex.trace
  • img.x.lab
  • img.y.lab
  • main

code

rainbow

itemize

  • trace.format

Details

This function is a simple Fourier spectrogram plotter. It's useful to compare this image with images generated by HHGramImage to see how the Fourier and Hilbert spectrograms differ.

References

Jonathan M. Lees (2012). RSEIS: Seismic Time Series Analysis Tools. R package version 3.0-6. http://CRAN.R-project.org/package=RSEIS

See Also

HHGramImage, EvolutiveFFT

Examples

Run this code
data(PortFosterEvent)

dt <- mean(diff(tt))

ft <- list()
ft$nfft <- 4096
ft$ns <- 30
ft$nov <- 29

time.span <- c(5, 10)
freq.span <- c(0, 25)
amp.span <- c(1e-5, 0.0003)
FTGramImage(sig, dt, ft, time.span = time.span, freq.span = freq.span, 
    amp.span = amp.span, pretty = TRUE, img.x.format = "%.1f",
    img.y.format = "%.0f",
    main = "Port Foster Event - Fourier Spectrogram")

Run the code above in your browser using DataLab