maad.spl.attenuation_dB

maad.spl.attenuation_dB(f, r, r0, t=20, rh=60, pa=101325, a0=0.02)[source]

Compute the attenuation in decibels taking into account the geometric, atmospheric and habitat attenuation contributions.

Parameters:
f: scalar or array-like

frequency in Hz

rscalar or array-like

propagation distances in m

r0scalar

reference distance in m

t: scalar, optional, default is 20

temperature in °C

rh: scalar, optional, default is 60

relative humidity in %

pa: scalar, optional, default is 101325

atmospheric pressure in Pa

a0scalar, optional, default is 0.02

attenuation coefficient of the habitat in dB/kHz/m

Returns:
Asum_dBscalar or array-like (vector (1D) or matrix (2D))

Global attenuation in decibel taking into account the geometric, atmospheric and habitat attenuation. => subtract Asum_dB from the reference acoustic pressure L0 in dB (or sound pressure level (SPL)) measuread at distance r0 for each frequency and distance to estimate the pressure after attenuation taking into account 3 types of attenuation rows : frequencies columns :distances

Examples

>>> import numpy as np
>>> fn = np.arange(500,10500,500)
>>> r = np.arange(10,110)
>>> r0 = 1
>>> Asum_dB, df_att = maad.spl.attenuation_dB(fn,r,r0)

For 2kHz @50m, the attenuation is mainly drive by geometric attenuation

>>> df_att[(df_att.f==2000) & (df_att.r==50)]
            f   r  Ageo_dB   Aatm_dB   Ahab_dB    Asum_dB
    310  2000  50  33.9794  0.454776      1.96  36.394176

For 10Hz @100m, the attenuation due to the atmosphere and the habitat is no negligible

>>> df_att[(df_att.f==10000) & (df_att.r==100)]
              f   r  Ageo_dB      Aatm_dB   Ahab_dB    Asum_dB
    1990  10000  100    40.0    13.335002      19.8  73.135002