maad.features.bioacoustics_index

maad.features.bioacoustics_index(Sxx, fn, flim=(2000, 15000), R_compatible='soundecology')[source]

Compute the Bioacoustics Index from a spectrogram [1].

Parameters:
Sxxndarray of floats

matrix : Spectrogram

fnvector

frequency vector

flimtupple (fmin, fmax), optional, default is (2000, 15000)

Frequency band used to compute the bioacoustic index.

R_compatiblestring, default is “soundecology”

if ‘soundecology’, the result is similar to the package SoundEcology in R Otherwise, the result is specific to maad

Returns:
BIscalar

Bioacoustics Index

Notes

Soundecology compatible version: * Average of dB value * Remove negative value in order to get positive values only * Dividing by the frequency resolution df instead of multiplication

References

[1]

Boelman NT, Asner GP, Hart PJ, Martin RE. 2007. Multi-trophic invasion resistance in Hawaii: bioacoustics, field surveys, and airborne remote sensing. Ecological Applications 17: 2137-2144. DOI: 10.1890/07-0004.1

[2]

Ported and modified from the soundecology R package - cran.ms.unimelb.edu.au/web/packages/soundecology/soundecology.pdf.

Examples

>>> import maad
>>> s, fs = maad.sound.load('../data/cold_forest_daylight.wav')
>>> Sxx, tn, fn, ext = maad.sound.spectrogram (s, fs,mode='amplitude')  
>>> BI = maad.features.bioacoustics_index(Sxx,fn)
>>> print('BI Soundecology : %2.2f ' %BI) 
BI Soundecology : 52.84
>>> BI  = maad.features.bioacoustics_index(Sxx,fn,R_compatible=None)
>>> print('BI MAAD : %2.2f ' %BI) 
BI MAAD : 17.05