Bands Module
The bands module contains functions for working with octave and third-octave frequency bands, based on IEC 61672-1:2013.
| FUNCTION | DESCRIPTION |
|---|---|
octave |
Generate center frequencies for octave bands. |
octave_low |
Calculate lower corner frequencies for octave bands. |
octave_high |
Calculate upper corner frequencies for octave bands. |
third |
Generate center frequencies for third-octave bands. |
third_low |
Calculate lower corner frequencies for third-octave bands. |
third_high |
Calculate upper corner frequencies for third-octave bands. |
third2oct |
Convert third-octave band levels to octave band levels. |
Attributes
OCTAVE_CENTER_FREQUENCIES
module-attribute
OCTAVE_CENTER_FREQUENCIES = (
NOMINAL_OCTAVE_CENTER_FREQUENCIES
)
Preferred nominal octave band center frequencies.
THIRD_OCTAVE_CENTER_FREQUENCIES
module-attribute
THIRD_OCTAVE_CENTER_FREQUENCIES = (
NOMINAL_THIRD_OCTAVE_CENTER_FREQUENCIES
)
Preferred nominal third-octave band center frequencies.
Functions
octave
Generate a Numpy array for central frequencies of octave bands.
There are more information on how to calculate 'real' bands in http://blog.prosig.com/2006/02/17/standard-octave-bands/
| PARAMETER | DESCRIPTION |
|---|---|
first
|
First octave centerfrequency.
TYPE:
|
last
|
Last octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray[float64]
|
Array of octave band center frequencies in Hz. |
Source code in acoustic_toolbox/bands.py
octave_low
octave_high
third
Generate a Numpy array for central frequencies of third octave bands.
| PARAMETER | DESCRIPTION |
|---|---|
first
|
First third octave centerfrequency.
TYPE:
|
last
|
Last third octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray[float64]
|
Array of third octave band center frequencies in Hz. |
Source code in acoustic_toolbox/bands.py
third_low
Lower cornerfrequencies of third-octaves.
| PARAMETER | DESCRIPTION |
|---|---|
first
|
First third octave centerfrequency.
TYPE:
|
last
|
Last third octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray[float64]
|
Array of lower corner frequencies in Hz. |
Source code in acoustic_toolbox/bands.py
third_high
Higher cornerfrequencies of third-octaves.
| PARAMETER | DESCRIPTION |
|---|---|
first
|
First third octave centerfrequency.
TYPE:
|
last
|
Last third octave centerfrequency.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray[float64]
|
Array of upper corner frequencies in Hz. |
Source code in acoustic_toolbox/bands.py
third2oct
Calculate Octave levels from third octave levels.
| PARAMETER | DESCRIPTION |
|---|---|
levels
|
Array containing third octave levels. |
axis
|
Axis over which to perform the summation.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
NDArray[float64]
|
Array containing octave band levels. |
Note
The number of elements along the summation axis should be a factor of 3. : Third octave levels
| RAISES | DESCRIPTION |
|---|---|
ValueError
|
If the shape of levels array is not compatible with the operation. |
Source code in acoustic_toolbox/bands.py
:::