Stft#
- class ansys.sound.core.spectrogram_processing.Stft(signal=None, fft_size=2048, window_type='HANN', window_overlap=0.5)#
Computes the short-time Fourier transform (STFT) of a signal.
Class instantiation takes the following parameters.
- Parameters:
- signal
Field|FieldsContainer, default:None Input signal on which to compute the STFT.
- fft_size
int, default: 2048 Size of the FFT to compute the STFT. Use a power of 2 for better performance.
- window_type
str, default: ‘HANN’ Window type used for the FFT computation. Options are
'TRIANGULAR','BLACKMAN','BLACKMANHARRIS','HAMMING','HANN','GAUSS','FLATTOP', and'RECTANGULAR'.- window_overlap
float, default: 0.5 Overlap value between two successive FFT computations. Values can range from 0 to 1. For example,
0means no overlap, and0.5means 50% overlap.
- signal
Methods
Convert a DPF fields container to a NumPy array.
Get the STFT of the signal as a DPF fields container.
Get the STFT of the signal as a NumPy array.
Get the amplitude of the STFT as a NumPy array.
Get the phase of the STFT as a NumPy array.
Plot signals.
Compute the STFT.
Attributes
Number of FFT points.
Input signal.
Window overlap in %.
Window type.