FiltFreqWeight#

class acoular.tprocess.FiltFreqWeight

Bases: Filter

Apply frequency weighting according to IEC 61672-1.

This filter implements frequency weighting curves commonly used in sound level meters for noise measurement. It provides A-weighting, C-weighting, and Z-weighting options.

See also

Filter

Base class for implementing IIR filters.

Notes

  • The filter is designed following IEC 61672-1:2002, the standard for sound level meters.

  • The weighting curves are implemented using bilinear transformation of analog filter coefficients to the discrete domain.

weight

Defines the frequency weighting curve:

  • 'A': Mimics human hearing sensitivity at low sound levels.

  • 'C': Used for high-level sound measurements with less attenuation at low frequencies.

  • 'Z': A flat response with no frequency weighting.

Default is 'A'.

sos

Second-order sections (SOS) representation of the filter coefficients. This property is dynamically computed based on weight and the Filter.source’s digest.

digest

A unique identifier for the filter, based on its properties. (read-only)

result(num)

Apply the IIR filter to the input signal and yields filtered data block-wise.

This method processes the signal provided by source, applying the defined filter coefficients (sos) using the scipy.signal.sosfilt() function. The filtering is performed in a streaming fashion, yielding blocks of filtered signal data.

Parameters:
numint

Number of samples per block.

Yields:
numpy.ndarray

An array containing the bandpass-filtered signal for the current block. Each block has the shape (num, num_channels), where num_channels is inherited from the source. The last block may contain fewer samples if the total number of samples is not a multiple of num.

source

The input data source. It must be an instance of a SamplesGenerator-derived class.

sample_freq

Sampling frequency of output signal, as given by source.

num_channels

Number of channels in output, as given by source.

num_samples

Number of samples in output, as given by source.