Decibel
The decibel module contains basic functions for decibel arithmetic.
Functions
dbsum
dbsum(levels, axis=None) -> float
Energetic summation of levels.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
Sequence of levels.
|
axis
|
Axis over which to perform the operation. $$ L_{sum} = 10 \log_{10}{\sum_{i=0}^n{10^{L/10}}} $$
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Energetic summation of levels. |
Source code in acoustic_toolbox/decibel.py
dbmean
dbmean(levels, axis=None) -> float
Energetic average of levels.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
Sequence of levels.
|
axis
|
Axis over which to perform the operation. $$ L_{mean} = 10 \log_{10}{\frac{1}{n}\sum_{i=0}^n{10^{L/10}}} $$
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
float
|
Energetic average of levels. |
Source code in acoustic_toolbox/decibel.py
dbadd
Energetic addition.
Energetically adds b to a.
$$ L_{a+b} = 10 \log_{10}{10^{L_b/10}+10^{L_a/10}} $$
| PARAMETER | DESCRIPTION |
|---|---|
a
|
Single level or sequence of levels. |
b
|
Single level or sequence of levels. |
| RETURNS | DESCRIPTION |
|---|---|
float
|
Energetic addition of a and b. |
Source code in acoustic_toolbox/decibel.py
dbsub
Energetic subtraction.
Energitally subtract b from a.
| PARAMETER | DESCRIPTION |
|---|---|
a
|
Single level or sequence of levels. |
b
|
Single level or sequence of levels. |
| RETURNS | DESCRIPTION |
|---|---|
float
|
Energetic subtraction of a and b. |
Source code in acoustic_toolbox/decibel.py
dbmul
dbmul(levels, f, axis=None) -> ndarray
Energetically add levels f times.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
Sequence of levels.
|
f
|
Multiplication factor
|
axis
|
Axis over which to perform the operation.
DEFAULT:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
Resulting levels after energetic addition. |
Source code in acoustic_toolbox/decibel.py
dbdiv
Energetically divide levels f times.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
Sequence of levels. |
f
|
Divider
TYPE:
|
axis
|
Axis over which to perform the operation.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
Resulting levels after energetic division. |
Source code in acoustic_toolbox/decibel.py
:::