Questions tagged [fft]

FFT is short for fast Fourier transform, any of a set of algorithms for quickly computing the discrete Fourier transform (DFT).

The FFT finds a lot of application in data analysis, particularly time-series and image data, and particularly when the data has a periodic nature, or at least a periodic component. The FFT also finds application in digital filtering. There are many FFT algorithms; they all calculate the Discrete Fourier Transform in O(n log n) operations, while the naive DFT implementation is O(n^2).

Mathematically, the Fourier Transform fits a set of sinusoids to the input data - revealing relative strengths of periodic components of the signal. The fit is optimal in a least-squared error sense. In the case of the Discrete Fourier Transform, the sinusoids are periodically related.

Related topics include DFT, signal processing, convolution, and window functions.

More information on FFT can be found in the Wikipedia article on FFT.

5308 questions
2
votes
1 answer

FFT of Gaussian and Lorentzian functions in Python

I need to calculate the Fourier Transform of both Gaussian and Lorentzian functions and plot the result. I know the result for both, but I can't seem to get them right and I don't really understand how the fft works in Python... This is what I have…
user40653
  • 45
  • 1
  • 6
2
votes
0 answers

C# NAudio FFT Output Interpretation

I am currently coding a MusicPlayer with NAudio and XNA and I though it'd be a nice idea to visualize a diagram with the intensity of all the frequencies similar to the Monstercat videos (example). After a short internet search I found FFT and used…
user4063307
2
votes
2 answers

PhantomJS analyze FFT data of mp3 file and save it

I am learning/playing with Web Audio API and it is awesome. I have some code, that analyses FFT of audio stream and do some calculations in realtime. It runs in browser. But now I need to do the same thing, but process the whole audiofile and get…
Ural
  • 385
  • 4
  • 11
2
votes
1 answer

Implementing an FFT using vDSP

I have data regarding the redness of the user's finger that is currently quite noisy, so I'd like to run it through an FFT to reduce the noise. The data on the left side of this image is similar to my data currently. I've familiarized myself with…
fi12
  • 495
  • 11
  • 30
2
votes
4 answers

Python: Fast Hankel Transform for 1d array

I'm trying to find any existing implementation for Hankel Transform in Python (actually i'm more into symmetric fourier transform of two 2d radially symmetric functions but it can be easily reduced to hankel transform). I do know about hankel python…
2
votes
1 answer

Reading out specific points off the Matlab / Octave fft2() function output

I am getting familiarized with Octave and the function fft2(). In this toy example, I am aiming at producing the 2D DFT of the following 256 x 256 png image: To be able to understand the output easily, I try to convert this image into a 256 x 256…
Antoni Parellada
  • 4,253
  • 6
  • 49
  • 114
2
votes
2 answers

Detect frequency of audio input - Java?

I've been researching this off-and-on for a few months. I'm looking for a library or working example code to detect the frequency in sound card audio input, or detect presence of a given set of frequencies. I'm leaning towards Java, but the real…
Jason Antman
  • 2,620
  • 2
  • 24
  • 26
2
votes
1 answer

Unexpected Fourier Transform result in Python Numpy

I am having a problem plotting the fourier transform of a data series (Y = intensity, X = wavelength). The goal is to remove the sinusoidal oscillation but applying a notch filter to the fourier transform of the data, followed by another fourier…
Nyxynyx
  • 61,411
  • 155
  • 482
  • 830
2
votes
0 answers

Applying FFT giving all maxPeaks at 1

I am trying to accomplish applying an FFT algorithm to set of filtered data. The filter I was asked to implement was a second order high pass IIR filter. I get the array of filtered data and then I pass to my FFT function. Everytime I do, I am just…
dexter87
  • 85
  • 1
  • 8
2
votes
1 answer

2D fourier transform with Eigen and FFTW

I'm trying to do a real-valued 2d Fourier Transform with FFTW. My data is stored in a dynamically sized Eigen Matrix. Here's the wrapper class I wrote: FFT2D.h: #include class FFT2D { public: enum FFT_TYPE {FORWARD=0, REVERSE=1}; …
halp_me
  • 46
  • 7
2
votes
2 answers

power spectral density from fft result c#

I have a Complex[] (from CsCore) which is the result of my FFT. Complex has a float real and a float imaginary. From this I calculated the following Frequency: (double)index * sampleRate / FftSize; Amplitude / Magnitude: Math.Sqrt(Math.Pow(real,…
Gert Kommer
  • 1,163
  • 2
  • 22
  • 49
2
votes
1 answer

fft power spectrum woes

I'm having trouble getting a frequency spectrum out of a fourier transform... I have some data: That I have mean-centered, and doesn't seem to have too much of a trend... I plot the fourier transform of it: And I get something that is not…
Him
  • 5,257
  • 3
  • 26
  • 83
2
votes
1 answer

Memory usage of scipy.fftpack

I am having trouble with high memory usage when performing ffts with scipy's fftpack. Example obtained with the module memory_profiler: Line # Mem usage Increment Line Contents ================================================ 4 50.555 MiB…
josteinb
  • 1,892
  • 2
  • 18
  • 32
2
votes
1 answer

Why is irfftn(rfftn(x)) not equal to x?

If the trailing dimension of an array x is odd, the transform y = irfftn(rfftn(x)) does not have the same shape as the input array. Is this by design? And if so, what is the motivation? Example code is below. import numpy as np shapes = [(10, 10),…
Till Hoffmann
  • 9,479
  • 6
  • 46
  • 64
2
votes
1 answer

Liftering cutoff

Is there a rule of thumb in deciding the cut-off value when performing the low time liftering process in Cepstral analysis? Or is it just trial and error analysis? I am trying to calculate the spectral envelope of the frequency response of data…
Kanmani
  • 479
  • 7
  • 21