View source: R/tail_to_signal_ratio.R
tail_to_signal_ratio | R Documentation |
tail_to_signal_ratio
measures reverberations as tail-to-signal ratio of signals referenced in an extended selection table.
tail_to_signal_ratio(X, mar, parallel = 1, pb = TRUE, type = 1, bp = 'freq.range', output = "est", hop.size = 1, wl = NULL)
X |
object of class 'extended_selection_table' created by the function |
mar |
numeric vector of length 1. Specifies the margins adjacent to the start and end points of selection over which to measure ambient noise. |
parallel |
Numeric vector of length 1. Controls whether parallel computing is applied by specifying the number of cores to be used. Default is 1 (i.e. no parallel computing). |
pb |
Logical argument to control if progress bar is shown. Default is |
type |
Numeric. Determine the formula to be used to calculate the tail-to-signal ratio (S = signal, T = tail, N = background noise):
|
bp |
Numeric vector of length 2 giving the lower and upper limits of a frequency bandpass filter (in kHz). Alternatively, when set to 'freq.range' (default), which will make the function use the 'bottom.freq' and 'top.freq' as the bandpass range. |
output |
Character vector of length 1 to determine if an extended selection table ('est', default) or a data frame ('data.frame'). |
hop.size |
A numeric vector of length 1 specifying the time window duration (in ms). Default is 1 ms, which is equivalent to ~45 wl for a 44.1 kHz sampling rate. Ignored if 'wl' is supplied. |
wl |
A numeric vector of length 1 specifying the window length of the spectrogram, default
is NULL. Ignored if |
Tail-to-signal ratio (TSR) measures ratio of energy in the tail of reverberations to energy in the signal. A general margin in which reverberation tail will be measured must be specified. The function will measure TSR within the supplied frequency range (e.g. bandpass) of the reference signal ('bottom.freq' and 'top.freq' columns in 'X'). Two methods for calculating reverberations are provided (see 'type' argument). Note that 'type' 2 is not equivalent to the original description of TSR in Dabelsteen et al. (1993) and is better referred to as tail-to-noise ratio.
Extended selection table similar to input data, but also includes a new column (tail.to.signal.ratio) with the tail-to-signal ratio values.
Marcelo Araya-Salas (marcelo.araya@ucr.ac.cr)
Araya-Salas, M. (2020). baRulho: baRulho: quantifying habitat-induced degradation of (animal) acoustic signals in R. R package version 1.0.2
Dabelsteen, T., Larsen, O. N., & Pedersen, S. B. (1993). Habitat-induced degradation of sound signals: Quantifying the effects of communication sounds and bird location on blur ratio, excess attenuation, and signal-to-noise ratio in blackbird song. The Journal of the Acoustical Society of America, 93(4), 2206.
Darden, SK, Pedersen SB, Larsen ON, & Dabelsteen T. (2008). Sound transmission at ground level in a short-grass prairie habitat and its implications for long-range communication in the swift fox *Vulpes velox*. The Journal of the Acoustical Society of America, 124(2), 758-766.
excess_attenuation
{ # load example data data("playback_est") # remove noise selections pe <- playback_est[playback_est$signal.type != "ambient", ] # using margin for noise of 0.01 tail_to_signal_ratio(X = pe, mar = 0.01, bp = NULL) # tail-to-noise ratio (type 2) tail_to_signal_ratio(X = playback_est, mar = 0.01, type = 2) }
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.