Descriptors
The descriptors module offers all kinds of acoustics related descriptors.
Descriptors from ISO/TR 25417:2007.
| ATTRIBUTE | DESCRIPTION |
|---|---|
REFERENCE_PRESSURE |
Reference pressure for sound pressure level calculations.
|
REFERENCE_SOUND_EXPOSURE |
Reference sound exposure for sound exposure level calculations.
|
REFERENCE_POWER |
Reference power for sound power level calculations.
|
REFERENCE_ENERGY |
Reference energy for sound energy level calculations.
|
REFERENCE_INTENSITY |
Reference intensity for sound intensity level calculations.
|
| FUNCTION | DESCRIPTION |
|---|---|
sound_pressure_level |
Calculate sound pressure level. |
equivalent_sound_pressure_level |
Calculate equivalent sound pressure level. |
peak_sound_pressure |
Calculate peak sound pressure. |
peak_sound_pressure_level |
Calculate peak sound pressure level. |
sound_exposure |
Calculate sound exposure. |
sound_exposure_level |
Calculate sound exposure level. |
sound_power_level |
Calculate sound power level. |
sound_energy |
Calculate sound energy. |
sound_energy_level |
Calculate sound energy level. |
sound_intensity |
Calculate sound intensity. |
time_averaged_sound_intensity |
Calculate time-averaged sound intensity. |
time_averaged_sound_intensity_level |
Calculate time-averaged sound intensity level. |
normal_time_averaged_sound_intensity |
Calculate normal time-averaged sound intensity. |
normal_time_averaged_sound_intensity_level |
Calculate normal time-averaged sound intensity level. |
Other descriptors
Attributes
REFERENCE_PRESSURE
module-attribute
Reference value of the sound pressure \(p_0\) is \(2 \cdot 10^{-5}\) Pa.
REFERENCE_SOUND_EXPOSURE
module-attribute
Reference value of the sound exposure \(E_0\) is \(4 \cdot 10^{-12} \mathrm{Pa}^2\mathrm{s}\).
REFERENCE_POWER
module-attribute
Reference value of the sound power \(P_0\) is 1 pW.
REFERENCE_ENERGY
module-attribute
Reference value of the sound energy \(J_0\) is 1 pJ.
REFERENCE_INTENSITY
module-attribute
Reference value of the sound intensity \(I_0\) is \(\mathrm{1 pW/m^2}\).
Functions
sound_pressure_level
sound_pressure_level(
pressure, reference_pressure=REFERENCE_PRESSURE
) -> float | ndarray
Sound pressure level \(L_p\) in dB.
The sound pressure level is calculated as: $$ L_p = 10 \log_{10}{ \left( \frac{p^2}{p_0^2} \right)} $$
See section 2.2 of the standard.
| PARAMETER | DESCRIPTION |
|---|---|
pressure
|
Instantaneous sound pressure \(p\).
|
reference_pressure
|
Reference value \(p_0\).
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float | ndarray
|
Sound pressure level |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
equivalent_sound_pressure_level
equivalent_sound_pressure_level(
pressure, reference_pressure=REFERENCE_PRESSURE, axis=-1
) -> float | ndarray
Time-averaged sound pressure level \(L_{p,T}\) or equivalent-continious sound pressure level \(L_{p,eqT}\) in dB.
The time-averaged sound pressure level is calculated as: $$ L_{p,T} = L_{p,eqT} = 10.0 \log_{10}{ \left( \frac{\frac{1}{T} \int_{t_1}^{t_2} p^2 (t) \mathrm{d} t }{p_0^2} \right)} $$
See section 2.3 of the standard.
| PARAMETER | DESCRIPTION |
|---|---|
pressure
|
Instantaneous sound pressure \(p\).
|
reference_pressure
|
Reference value \(p_0\).
DEFAULT:
|
axis
|
Axis
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float | ndarray
|
Time-averaged sound pressure level |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
peak_sound_pressure
Peak sound pressure \(p_{peak}\) is the greatest absolute sound pressure during a certain time interval.
| PARAMETER | DESCRIPTION |
|---|---|
pressure
|
Instantaneous sound pressure \(p\).
|
axis
|
Axis
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float | ndarray
|
Peak sound pressure \(p_{peak} = \mathrm{max}(|p|)\) |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
peak_sound_pressure_level
peak_sound_pressure_level(
pressure, reference_pressure=REFERENCE_PRESSURE, axis=-1
) -> float | ndarray
Peak sound pressure level \(L_{p,peak}\) in dB.
| PARAMETER | DESCRIPTION |
|---|---|
pressure
|
Instantaneous sound pressure \(p\).
|
reference_pressure
|
Reference value \(p_0\).
DEFAULT:
|
axis
|
Axis
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float | ndarray
|
Peak sound pressure level $$ L_{p,peak} = 10.0 \log \frac{p_{peak}^2.0}{p_0^2} $$ |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
sound_exposure
Calculate sound exposure \(E_T\).
| PARAMETER | DESCRIPTION |
|---|---|
pressure
|
Instantaneous sound pressure \(p\).
|
fs
|
Sample frequency \(f_s\).
|
axis
|
Axis
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float | ndarray
|
Sound exposure $$ E_T = \int_{t_1}^{t_2} p^2(t) \mathrm{d}t $$ |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
sound_exposure_level
sound_exposure_level(
pressure,
fs,
reference_sound_exposure=REFERENCE_SOUND_EXPOSURE,
axis=-1,
) -> float | ndarray
Sound exposure level \(L_{E,T}\) in dB.
| PARAMETER | DESCRIPTION |
|---|---|
pressure
|
Instantaneous sound pressure \(p\).
|
fs
|
Sample frequency \(f_s\).
|
reference_sound_exposure
|
Reference sound exposure \(E_T\).
DEFAULT:
|
axis
|
Axis
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float | ndarray
|
Sound exposure level $$ L_{E,T} = 10 \log_{10}{ \frac{E_T}{E_0} } $$ |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
sound_power_level
sound_power_level(
power, reference_power=REFERENCE_POWER
) -> float | ndarray
Sound power level \(L_W\).
| PARAMETER | DESCRIPTION |
|---|---|
power
|
Sound power \(P\).
|
reference_power
|
Reference sound power \(P_0\).
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float | ndarray
|
Sound power level calculated as: $$ 10 \log_{10}{ \frac{P}{P_0} } $$ |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
sound_energy
sound_energy_level
sound_energy_level(
energy, reference_energy=REFERENCE_ENERGY
) -> ndarray
Sound energy level \(L_J\) in dB.
| PARAMETER | DESCRIPTION |
|---|---|
energy
|
Sound energy \(J\).
|
reference_energy
|
Reference sound energy \(J_0\).
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
Sound energy level $$ L_{J} = 10 \log_{10}{ \frac{J}{J_0} } $$ |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
sound_intensity
sound_intensity(pressure, velocity) -> ndarray
Sound intensity \(\mathbf{i}\).
| PARAMETER | DESCRIPTION |
|---|---|
pressure
|
Sound pressure \(p(t)\).
|
velocity
|
Particle velocity \(\mathbf{u}(t)\).
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
Sound intensity $$ \mathbf{i} = p(t) \cdot \mathbf{u}(t) $$ |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
time_averaged_sound_intensity
time_averaged_sound_intensity(intensity, axis=-1) -> float
Time-averaged sound intensity \(\mathbf{I}_T\).
| PARAMETER | DESCRIPTION |
|---|---|
intensity
|
Sound intensity \(\mathbf{i}\).
|
axis
|
Axis
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Time-averaged sound intensity $$ I_T = \frac{1}{T} \int_{t_1}^{t_2} \mathbf{i}(t) $$ |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
time_averaged_sound_intensity_level
time_averaged_sound_intensity_level(
time_averaged_sound_intensity,
reference_intensity=REFERENCE_INTENSITY,
axis=-1,
) -> float
Time-averaged sound intensity level \(L_{I,T}\).
| PARAMETER | DESCRIPTION |
|---|---|
time_averaged_sound_intensity
|
Time-averaged sound intensity \(\mathbf{I}_T\).
|
reference_intensity
|
Reference sound intensity \(I_0\).
DEFAULT:
|
axis
|
Axis along which to calculate norm.
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Time-averaged sound intensity level calculated as: $$ L_{I,T} = 10 \log_{10} { \frac{|\mathbf{I}_T|}{I_0} } $$ |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
normal_time_averaged_sound_intensity
normal_time_averaged_sound_intensity(
time_averaged_sound_intensity, unit_normal_vector
) -> float
Normal time-averaged sound intensity \(\mathbf{I}_{n,T}\).
| PARAMETER | DESCRIPTION |
|---|---|
time_averaged_sound_intensity
|
Time-averaged sound intensity \(\mathbf{I}_T\).
|
unit_normal_vector
|
Unit normal vector \(\mathbf{n}\).
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Normal time-averaged sound intensity $$ I_{n,T} = \mathbf{I}_T \cdot \mathbf{n} $$ |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
normal_time_averaged_sound_intensity_level
normal_time_averaged_sound_intensity_level(
normal_time_averaged_sound_intensity,
reference_intensity=REFERENCE_INTENSITY,
) -> float
Normal time-averaged sound intensity level \(L_{I_{n,T}}\) in dB.
| PARAMETER | DESCRIPTION |
|---|---|
normal_time_averaged_sound_intensity
|
Normal time-averaged sound intensity \(I_{n,T}\).
|
reference_intensity
|
Reference sound intensity \(I_0\).
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Normal time-averaged sound intensity level calculated as: $$ I_{n,T} = 10 \log_{10} { \frac{|I_{n,T}|}{I_0}} $$ |
Source code in acoustic_toolbox/standards/iso_tr_25417_2007.py
leq
leq(levels, int_time=1.0) -> float
Equivalent level \(L_{eq}\).
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
Levels as function of time.
|
int_time
|
Integration time in seconds.
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Equivalent level \(L_{eq}\). |
Source code in acoustic_toolbox/descriptors.py
sel
lw
lw(W, Wref=1e-12) -> float
Sound power level \(L_{w}\) for sound power \(W\) and reference power \(W_{ref}\).
| PARAMETER | DESCRIPTION |
|---|---|
W
|
Sound power \(W\).
|
Wref
|
Reference power \(W_{ref}\). Default value is \(10^{12}\) watt.
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Sound power level \(L_{w}\). |
Source code in acoustic_toolbox/descriptors.py
lden
lden(
lday,
levening,
lnight,
hours: tuple[float, float, float] = (12.0, 4.0, 8.0),
adjustment: tuple[float, float, float] = (
0.0,
5.0,
10.0,
),
) -> float
Calculate \(L_{den}\) from \(L_{day}\), \(L_{evening}\) and \(L_{night}\).
| PARAMETER | DESCRIPTION |
|---|---|
lday
|
Equivalent level during day period \(L_{day}\).
|
levening
|
Equivalent level during evening period \(L_{evening}\).
|
lnight
|
Equivalent level during night period \(L_{night}\).
|
hours
|
Hours per period. |
adjustment
|
Correction factor per period. |
| RETURNS | DESCRIPTION |
|---|---|
float
|
\(L_{den}\) |
See Also
Source code in acoustic_toolbox/descriptors.py
ldn
ldn(
lday,
lnight,
hours: tuple[float, float] = (15.0, 9.0),
adjustment: tuple[float, float] = (0.0, 10.0),
) -> float
Calculate \(L_{dn}\) from \(L_{day}\) and \(L_{night}\).
| PARAMETER | DESCRIPTION |
|---|---|
lday
|
Equivalent level during day period \(L_{day}\).
|
lnight
|
Equivalent level during night period \(L_{night}\).
|
hours
|
Hours per period. |
adjustment
|
Correction factor per period. |
| RETURNS | DESCRIPTION |
|---|---|
float
|
\(L_{dn}\) |
See Also
Source code in acoustic_toolbox/descriptors.py
:::