Description Usage Arguments Value Author(s)
View source: R/calculateAverageSpectra.R
Calculates the average spectra of all the clicks present in an event
1 2 3 4 5 6 7 8 | calculateAverageSpectra(
x,
evNum = 1,
calibration = NULL,
wl = 4096,
sr = NULL,
plot = TRUE
)
|
x |
an AcousticEvent or AcousticStudy object |
evNum |
if |
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. |
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.
Taiki Sakai taiki.sakai@noaa.gov
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.