FiltFreqWeight#
- class acoular.tprocess.FiltFreqWeight
Bases:
FilterApply 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
FilterBase 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
weightand theFilter.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 thescipy.signal.sosfilt()function. The filtering is performed in a streaming fashion, yielding blocks of filtered signal data.- Parameters:
- num
int Number of samples per block.
- num
- Yields:
numpy.ndarrayAn array containing the bandpass-filtered signal for the current block. Each block has the shape (
num,num_channels), wherenum_channelsis inherited from thesource. The last block may contain fewer samples if the total number of samples is not a multiple ofnum.
- 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.