maad.features.soundscape_index
- maad.features.soundscape_index(Sxx_power, fn, flim_bioPh=(1000, 10000), flim_antroPh=(0, 1000), R_compatible='soundecology')[source]
Compute the Normalized Difference Soundscape Index from a power spectrogram [1].
- Parameters:
- Sxx_powerndarray of floats
2d : Power Spectrogram
- fnvector
frequency vector
- flim_bioPhtupple (fmin, fmax), optional, default is (1000,10000)
Frequency band of the biophony
- flim_antroPh: tupple (fmin, fmax), optional, default is (0,1000)
Frequency band of the anthropophony
- R_compatiblestring, optional, default is “soundecology”
if ‘soundecology’, the result is similar to the package SoundEcology in R Otherwise, the result is specific to maad or Seewave R package
- Returns:
- NDSIscalar
(bioPh-antroPh)/(bioPh+antroPh)
- ratioBAscalar
biophonic energy / anthropophonic energy
- antroPhscalar
Acoustic energy in the anthropophonic bandwidth
- bioPhscalar
Acoustic energy in the biophonic bandwidth
References
[1]Kasten, Eric P., Stuart H. Gage, Jordan Fox, and Wooyeong Joo. 2012. The Remote Environmental Assessment Laboratory’s Acoustic Library: An Archive for Studying Soundscape Ecology. Ecological Informatics 12: 50-67. DOI: 10.1016/j.ecoinf.2012.08.001 https://doi.org/10.1016/j.ecoinf.2012.08.001
Ported from Seewave (http://rug.mnhn.fr/seewave) and soundecology R packages (cran.ms.unimelb.edu.au/web/packages/soundecology/soundecology.pdf).
Examples
>>> import maad >>> s, fs = maad.sound.load('../data/cold_forest_daylight.wav') >>> Sxx_power, tn, fn, ext = maad.sound.spectrogram (s, fs) >>> NDSI, ratioBA, antroPh, bioPh = maad.features.soundscape_index(Sxx_power,fn) >>> print('NDSI Soundecology : %2.2f ' %NDSI) NDSI Soundecology : 0.10 >>> NDSI, ratioBA, antroPh, bioPh = maad.features.soundscape_index(Sxx_power,fn,R_compatible=None) >>> print('NDSI MAAD: %2.2f ' %NDSI) NDSI MAAD: 0.99