[Numpy-discussion] Normalization of ifft

Charles R Harris charlesr.harris@gmail....
Thu Mar 26 20:34:29 CDT 2009


On Thu, Mar 26, 2009 at 7:17 PM, Michael Gilbert <
michael.s.gilbert@gmail.com> wrote:

> On Thu, 26 Mar 2009 16:56:13 -0700 Lutz Maibaum wrote:
>
> > Hello,
> >
> > I just started to use python and numpy for some numerical analysis. I
> > have a question about the definition of the inverse Fourier transform.
> > The user gives the formula (p.180)
> >
> >   x[m] = Sum_k X[k] exp(j 2pi k m / n)
> >
> > where X[k] are the Fourier coefficients, and n is the length of the
> arrays.
> >
> > The online documentation
> > (http://docs.scipy.org/doc/numpy/reference/routines.fft.html), on the
> > other hand, states that there is an additional factor of 1/n, which is
> > required to make ifft() the inverse of fft(). Is this a misprint in
> > the user guide?
>
> this documentation is saying that the difference between the equations
> for the fft and ifft is a factor of 1/n (not the numpy implementations).
> if you do
>
>  output = numpy.ifft( numpy.fft( input ) )
>
> and you get output = input, then the normalizations are appropriately
> weighted.
>
> the "correct" normalization (from a mathemetician viewpoint) is actually
> 1/sqrt (n) so that the fft is the same function as the ifft, but
> computer implementations tend not to do this since the sqrt takes a lot
> more operations than plain old 1/n.
>
> mike
> _______________________________________________
> Numpy-discussion mailing list
> Numpy-discussion@scipy.org
> http://mail.scipy.org/mailman/listinfo/numpy-discussion
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/numpy-discussion/attachments/20090326/d72cb265/attachment.html 


More information about the Numpy-discussion mailing list