Weighting Module
Weightings according to IEC 61672-1:2003.
| ATTRIBUTE | DESCRIPTION |
|---|---|
THIRD_OCTAVE_A_WEIGHTING |
A-weighting filter for preferred ⅓-octave band center frequencies.
|
THIRD_OCTAVE_C_WEIGHTING |
C-weighting filter for preferred ⅓-octave band center frequencies.
|
| FUNCTION | DESCRIPTION |
|---|---|
a_weighting |
A-weighting. |
c_weighting |
C-weighting. |
z2a |
Apply A-weighting to Z-weighted signal. |
a2z |
Remove A-weighting from A-weighted signal. |
z2c |
Apply C-weighting to Z-weighted signal. |
c2z |
Remove C-weighting from C-weighted signal. |
Attributes
THIRD_OCTAVE_A_WEIGHTING
module-attribute
THIRD_OCTAVE_A_WEIGHTING = array(
[
-63.4,
-56.7,
-50.5,
-44.7,
-39.4,
-34.6,
-30.2,
-26.2,
-22.5,
-19.1,
-16.1,
-13.4,
-10.9,
-8.6,
-6.6,
-4.8,
-3.2,
-1.9,
-0.8,
+0.0,
+0.6,
+1.0,
+1.2,
+1.3,
+1.2,
+1.0,
+0.5,
-0.1,
-1.1,
-2.5,
-4.3,
-6.6,
-9.3,
]
)
A-weighting filter for preferred ⅓-octave band center frequencies, as specified in acoustic_toolbox.bands.THIRD_OCTAVE_CENTER_FREQUENCIES.
THIRD_OCTAVE_C_WEIGHTING
module-attribute
THIRD_OCTAVE_C_WEIGHTING = array(
[
-11.2,
-8.5,
-6.2,
-4.4,
-3.0,
-2.0,
-1.3,
-0.8,
-0.5,
-0.3,
-0.2,
-0.1,
+0.0,
+0.0,
+0.0,
+0.0,
+0.0,
+0.0,
+0.0,
+0.0,
+0.0,
-0.1,
-0.2,
-0.3,
-0.5,
-0.8,
-1.3,
-2.0,
-3.0,
-4.4,
-6.2,
-8.5,
-11.2,
]
)
C-weighting filter for preferred ⅓-octave band center frequencies, as specified in acoustic_toolbox.bands.THIRD_OCTAVE_CENTER_FREQUENCIES.
Functions
a_weighting
Select frequency weightings between first and last centerfrequencies from A-weighting.
Possible values for these frequencies are third-octave frequencies between 12.5 Hz and 20,000 Hz (including them).
| PARAMETER | DESCRIPTION |
|---|---|
first
|
First third-octave centerfrequency.
TYPE:
|
last
|
Last third-octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
A-weighting between |
Source code in acoustic_toolbox/weighting.py
c_weighting
Select frequency weightings between first and last centerfrequencies from C-weighting.
Possible values for these frequencies are third-octave frequencies between 12.5 Hz and 20,000 Hz (including them).
| PARAMETER | DESCRIPTION |
|---|---|
first
|
First third-octave centerfrequency.
TYPE:
|
last
|
Last third-octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
C-weighting between |
Source code in acoustic_toolbox/weighting.py
z2a
Apply A-weighting to Z-weighted signal.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
Z-weighted signal.
TYPE:
|
first
|
First third-octave centerfrequency.
TYPE:
|
last
|
Last third-octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
A-weighted signal. |
Source code in acoustic_toolbox/weighting.py
a2z
Remove A-weighting from A-weighted signal.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
A-weighted signal.
TYPE:
|
first
|
First third-octave centerfrequency.
TYPE:
|
last
|
Last third-octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
Z-weighted signal. |
Source code in acoustic_toolbox/weighting.py
z2c
Apply C-weighting to Z-weighted signal.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
Z-weighted signal.
TYPE:
|
first
|
First third-octave centerfrequency.
TYPE:
|
last
|
Last third-octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
C-weighted signal. |
Source code in acoustic_toolbox/weighting.py
c2z
Remove C-weighting from C-weighted signal.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
C-weighted signal.
TYPE:
|
first
|
First third-octave centerfrequency.
TYPE:
|
last
|
Last third-octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
Z-weighted signal. |
Source code in acoustic_toolbox/weighting.py
a2c
Go from A-weighted to C-weighted.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
A-weighted signal.
TYPE:
|
first
|
First third-octave centerfrequency.
TYPE:
|
last
|
Last third-octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
C-weighted signal. |
Source code in acoustic_toolbox/weighting.py
c2a
Go from C-weighted to A-weighted.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
C-weighted signal.
TYPE:
|
first
|
First third-octave centerfrequency.
TYPE:
|
last
|
Last third-octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
ndarray
|
A-weighted signal. |
Source code in acoustic_toolbox/weighting.py
:::