Acoular 25.04 documentation

IRFFT

«  RFFT   ::   fprocess   ::   AutoPowerSpectra  »

IRFFT

class acoular.fprocess.IRFFT

Bases: TimeOut

Perform the inverse Fast Fourier Transform (IFFT) for one-sided multi-channel spectra.

This class converts spectral data from the frequency domain back into time-domain signals. The IFFT is calculated block-wise, where the block size is defined by the spectral data source. The output time-domain signals are scaled and processed according to the precision defined by the precision attribute.

workers = Union(Int(), None, default_value=None, desc='number of workers to use')

The number of workers (threads) to use for the IFFT calculation. A negative value utilizes all available logical CPUs. Default is None, which relies on the scipy.fft.irfft() implementation.

precision = Enum('float64', 'float32', desc='precision of the time signal after the ifft')

Determines the floating-point precision of the resulting time-domain signals. Options include 'float64' and 'float32'. Default is 'float64', ensuring high precision.

num_samples = Property(depends_on=['source.num_samples', 'source._block_size'])

The total number of time-domain samples in the output. Computed as the product of the number of input samples and the block size. Returns -1 if the number of input samples is negative.

digest = Property(depends_on=['source.digest', 'scaling', 'precision', '_block_size', 'window', 'overlap'])

A unique identifier based on the process properties.

result(num)

Generate time-domain signal blocks from spectral data.

This generator processes spectral data block-by-block, performing an inverse Fast Fourier Transform (IFFT) to convert the input spectra into time-domain signals. The output is yielded in blocks of the specified size.

Parameters:
numint

The number of time samples per output block. If num differs from the source block size, an internal buffer is used to assemble the required output.

Yields:
numpy.ndarray

Blocks of time-domain signals with shape (num, num_channels). The last block may contain fewer samples if the input data is insufficient to fill the requested size.

Notes

  • The method ensures that the source block size and frequency data are compatible for IFFT.

  • If the requested block size does not match the source block size, a buffer is used to assemble the output, allowing arbitrary block sizes to be generated.

  • For performance optimization, the number of workers (threads) can be specified via the workers attribute.

«  RFFT   ::   fprocess   ::   AutoPowerSpectra  »