spectro: Plot a spectrogram

Description Usage Arguments Examples

View source: R/spectro.R

Description

Plot a spectrogram

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
spectro(
  wave,
  channel = "left",
  FFT_size = 256,
  FFT_overlap = 0.875,
  FFT_win = "hann",
  LPF,
  HPF = 0,
  tlim = NULL,
  flim = NULL,
  ticks_y = NULL,
  col = gray.colors(25, 1, 0)
)

Arguments

wave

a Wave object.

channel

character. Channel to keep for analysis in a stereo recording: "left" or "right". Default setting is left.

FFT_size

integer. Size of the Fast Fourrier Transform (FFT) window. Default setting is 256.

FFT_overlap

numeric. Percentage of overlap between two FFT windows (from 0 to 1). Default setting is 0.875.

FFT_win

character. Specify the type of FFT window: "hann", "blackman4", or "blackman7". Default setting is "hann".

LPF

integer. Low-Pass Filter (Hz). Frequencies above the cutoff are greatly attenuated. Default setting is the Nyquist frequency of the recording.

HPF

integer. High-Pass Filter (Hz). Frequencies below the cutoff are greatly attenuated. Default setting is 0 Hz.

tlim

numeric. Specify the time limits on the X-axis in seconds (s). Default setting is NULL, i.e no time limits.

flim

numeric. Specify the frequency limits on the Y-axis in Hz. Default setting is NULL, i.e. frequency limits are equal to c(0, LPF).

ticks_y

numeric. Whether tickmarks should be drawn on the frequency Y-axis or not. The lower and upper bounds of the tickmarks and their intervals (in Hz) has to be specified. Default setting is NULL.

col

set the colors for the amplitude scale (dB) of the spectrogram.

Examples

1
2
data(myotis)
spectro(myotis, tlim = c(1, 2))

bioacoustics documentation built on Feb. 8, 2022, 5:06 p.m.