octave_bands
- ketos.utils.octave_bands(band_min=-1, band_max=9)[source]
Compute the min, central, and max frequency value of the specified octave bands, using the following formulas,
f_centre = 10^3 * 2^p , f_min = f_centre / sqrt(2) , f_max = f_centre * sqrt(2) ,
where p = band_number - 5
- Args:
- band_min: int
Lower octave band
- band_max: int
Upper octave band
- Returns:
- fcentre: numpy array
Central frequency of each band (in Hz)
- flow: numpy array
Minimum frequency of each band (in Hz)
- fhigh: numpy array
Maximum frequency of each band (in Hz)
- Example:
>>> from ketos.utils import octave_bands >>> >>> fc, fmin, fmax = octave_bands(1, 3) >>> print(fc) [ 62.5 125. 250. ]