Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

kissfft scaling

I am looking to compute a fast correlation using FFTs and the kissfft library, and scaling needs to be precise. What scaling is necessary (forward and backwards) and what value do I use to scale my data?

like image 669
Matt Esch Avatar asked Apr 11 '11 22:04

Matt Esch


People also ask

What is Kissfft?

KISS FFT - A mixed-radix Fast Fourier Transform based up on the principle, "Keep It Simple, Stupid."

What is Kiss FFT?

A Fast Fourier Transform based up on the principle, "Keep It Simple, Stupid". Kiss FFT is a very small, reasonably efficient, mixed radix FFT library that can use either fixed or floating point data types. Header files and static library are provided. (


1 Answers

The 3 most common FFT scaling factors are:

  • 1.0 forward FFT, 1.0/N inverse FFT

  • 1.0/N forward FFT, 1.0 inverse FFT

  • 1.0/sqrt(N) in both directions, FFT & IFFT

Given any possible ambiguity in the documentation, and for whatever scaling the user expects to be "correct" for their purposes, best to just feed a pure sine wave of known (1.0 float or 255 integer) amplitude and exactly periodic in the FFT length to the FFT (and/or IFFT) in question, and see if the scaling matches one of the above, is maybe different from one of the above by 2X or sqrt(2), or the desired scaling is something completely different.

e.g. Write a unit test for kissfft in your environment for your data types.

like image 157
hotpaw2 Avatar answered Oct 28 '22 20:10

hotpaw2