IRFFT#
- class acoular.fprocess.IRFFT
Bases:
TimeOutPerform 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
precisionattribute.- source
Data source;
Generatoror derived object.
- workers
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 thescipy.fft.irfft()implementation.
- precision
Determines the floating-point precision of the resulting time-domain signals. Options include
'float64'and'float32'. Default is'float64', ensuring high precision.
- num_samples
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
-1if the number of input samples is negative.
- digest
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:
- num
int The number of time samples per output block. If
numdiffers from the source block size, an internal buffer is used to assemble the required output.
- num
- Yields:
numpy.ndarrayBlocks 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
workersattribute.
- sample_freq
Sampling frequency of output signal, as given by
source.
- num_channels
Number of channels in output, as given by
source.