TimeConvolve#

class acoular.tprocess.TimeConvolve

Bases: TimeOut

Perform frequency domain convolution with the uniformly partitioned overlap-save (UPOLS) method.

This class convolves a source signal with a kernel in the frequency domain. It uses the UPOLS method, which efficiently computes convolutions by processing signal blocks and kernel blocks separately in the frequency domain. For detailed theoretical background, refer to [24].

Inherits from TimeOut, which allows the class to process signals generated by a source object. The kernel used for convolution can be one-dimensional or two-dimensional, and it can be applied across one or more channels of the source signal.

See also

TimeOut

The parent class for signal processing blocks.

SamplesGenerator

The interface for generating multi-channel time-domain signals.

source = Instance(SamplesGenerator)

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

kernel = CArray(dtype=float, desc='Convolution kernel.')

Convolution kernel in the time domain. The second dimension of the kernel array has to be either 1 or match the source’s num_channels attribute. If only a single kernel is supplied, it is applied to all channels.

digest = Property(depends_on=['source.digest', 'kernel'])

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

result(num=128)

Convolve the source signal with the kernel and yield the result in blocks.

The method generates the convolution of the source signal with the kernel by processing the signal in small blocks, performing the convolution in the frequency domain, and yielding the results block by block.

Parameters:
numint, optional

Number of samples per block. Default is 128.

Yields:
numpy.ndarray

A array of shape (num, num_channels), where num_channels is inhereted from the source, representing the convolution result in blocks.

Notes

  • The kernel is first validated and reshaped if necessary.

  • The convolution is computed efficiently using the FFT in the frequency domain.