Fast/Finite Fourier Transforms.

Static methods

staticfft(input:Array<Complex>):Array<Complex>

Computes the Discrete Fourier Transform (DFT) of a Complex sequence.

If the input has N data points (N should be a power of 2 or padding will be added) from a signal sampled at intervals of 1/Fs, the result will be a sequence of N samples from the Discrete-Time Fourier Transform (DTFT) - which is Fs-periodic - with a spacing of Fs/N Hz between them and a scaling factor of Fs.

staticifft(input:Array<Complex>):Array<Complex>

Computes the Inverse DFT of a periodic input sequence.

If the input contains N (a power of 2) DTFT samples, each spaced Fs/N Hz from each other, the result will consist of N data points as sampled from a time signal at intervals of 1/Fs with a scaling factor of 1/Fs.

staticrfft(input:Array<Float>):Array<Complex>

Like fft, but for a real (Float) sequence input.

Since the input time signal is real, its frequency representation is Hermitian-symmetric so we only return the positive frequencies.