TimeConvolve#
- class acoular.tprocess.TimeConvolve
Bases:
TimeOutPerform 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
TimeOutThe parent class for signal processing blocks.
SamplesGeneratorThe 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
1or match thesource’snum_channelsattribute. 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:
- num
int, optional Number of samples per block. Default is
128.
- num
- Yields:
numpy.ndarrayA array of shape (
num,num_channels), wherenum_channelsis inhereted from thesource, 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.