calculateAverageSpectra: Calculate Average Spectra of Clicks

Description Usage Arguments Value Author(s)

View source: R/calculateAverageSpectra.R

Description

Calculates the average spectra of all the clicks present in an event

Usage

1
2
3
4
5
6
7
8
calculateAverageSpectra(
  x,
  evNum = 1,
  calibration = NULL,
  wl = 4096,
  sr = NULL,
  plot = TRUE
)

Arguments

x

an AcousticEvent or AcousticStudy object

evNum

if x is a study, the event number to calculate the average spectra for

calibration

a calibration function to apply, if desired

wl

the size of the click clips to use for calculating the spectra. If greater than the clip present in the binary, clip will be zero padded

sr

a sample rate to use if the sample rate present in the database needs to be overridden (typically only needed if a decimator was used)

plot

logical flag whether or not to plot the result. The plot will be a two panel plot, the top is a concatenated spectrogram where the y-axis is frequency and the x-axis is click number. The bottom plot is the average spectrogram of all clicks, the y-axis is normalized magnitude (dB values for each click are normalized between 0 and 1 before averaging), x-axis is frequency.

Value

invisibly returns a list with three items: freq, the frequency, average, the average spectra of the event, and all, the individual spectra of each click in the event as a matrix.

Author(s)

Taiki Sakai taiki.sakai@noaa.gov


TaikiSan21/PAMr documentation built on Nov. 15, 2020, 9:46 p.m.