Inspired by the "Bioacoustic Index" from the paper:Boelman NT, Asner GP, Hart PJ, Martin RE. 2007. Multi-trophic invasion resistance in Hawaii: bioacoustics, field surveys, and airborne remote sensing. Ecol Applications 17(8):2137-44. Based on Matlab code provided by NT Boelman. Boelman et al. 2007 used min.freq=2000, max.freq=8000, w.len=512. Several parts where changed, in particular log math, so this won't be directly comparable to the original code in the paper.
Usage
bi(
wave,
w.len = 512,
w.fun = "hanning",
min.freq = 2000,
max.freq = 8000,
norm.spec = FALSE,
noise.red = 0,
rm.offset = TRUE
)
Arguments
- wave
an object of class Wave imported with the readWave function of the tuneR package.
- w.len
the window length to compute the spectrogram (i.e., FFT window size).
- w.fun
window function (filter to handle spectral leakage); "bartlett", "blackman", "flattop", "hamming", "hanning", or "rectangle".
- min.freq
miminum frequency to use when calculating the value, in Hertz. Default = NA.
- max.freq
maximum frequency to use when calculating the value, in Hertz. Default = NA (Nyquist).
- norm.spec
logical; if TRUE, the spectrogram is normalized, scaled by its maximum value (not recommended because normalized spectrograms with different SNR are not comparable).
- noise.red
numeric; controls the application of noise reduction. If set to 1, noise reduction is applied to each row by subtracting the median from the amplitude values. If set to 2, noise reduction is applied to each column similarly. If set to 0 (Default), noise reduction is not applied.
- rm.offset
logical; if set to TRUE, the function will remove DC offset before computing ADI. Default = TRUE.