FFTW backwards transform is multiplied by N
As you can see in the documentation, FFTW computes an unnormalized transform. That is, an additional division by the length of the signal is necessary to recover the input signal after a forward and an inverse transform: IFFT(FFT(signal))/N = signal
.
The Python NumPy FFT is normalized, it includes the division by N
in the inverse transform.
Do note that this additional division will not change your relative precision, as all values in the signal are divided by exactly the same number.
Additional information:
Some libraries (such as FFTW) compute the unnormalized FFT, skipping the division by N
in the inverse transform, for speed, since sometimes it might not be necessary. Other libraries define a different normalization altogether, for example they might do the division by N
in the forward transform instead of the inverse, or they might divide by the square root of N
in both forward and backward transforms.
Read more here: Source link