uwacan.Filterbank#

class Filterbank(*, bands_per_decade=None, frame_step=None, frame_duration=None, frame_overlap=0.5, min_frequency=None, max_frequency=None, hybrid_resolution=None, fft_window='hann')[source]#

Bases: object

Calculates spectrograms, both linear and banded.

Parameters:
bands_per_decadefloat, optional

The number of frequency bands per decade for logarithmic scaling.

frame_stepfloat

The time step between stft frames, in seconds.

frame_durationfloat

The duration of each stft frame, in seconds.

frame_overlapfloat, default=0.5

The overlap factor between stft frames. A negative value leaves gaps between frames.

min_frequencyfloat

The lowest frequency to include in the processing.

max_frequencyfloat

The highest frequency to include in the processing.

hybrid_resolutionfloat

A frequency resolution to aim for. Only used if frame_duration is not given

fft_windowstr, default=”hann”

The window function to apply to each rolling window before computing the FFT. Can be a string specifying a window type (e.g., "hann", "kaiser", "blackman") or an array-like sequence of window coefficients..

Raises:
ValueError

If the processing settings are not compatible, e.g., - frequency bands with bandwidth smaller than the frame duration allows

Notes

The processing is done in stft frames determined by frame_duration, frame_step frame_overlap, and hybrid_resolution. At least one of duration, step, or resolution has to be given, see time_frame_settings for further details. At least one of min_frequency and hybrid_resolution has to be given. Note that the frame_duration and frame_step can be auto-chosen from the overlap and required frequency resolution, either from hybrid_resolution or min_frequency.

Methods

rolling(time_data)

__call__(time_data)

Process time data to spectrograms.

Inherited methods