Questions tagged [fftw]

FFTW, "The Fastest Fourier Transform in The West", is a C library which implements discrete Fourier Transforms. It is licensed under the GNU GPL.

FFTW homepage: http://www.fftw.org/
FAQ: http://www.fftw.org/faq/

883 questions
47
votes
1 answer

Why is FFT of (A+B) different from FFT(A) + FFT(B)?

I have been fighting with a very weird bug for almost a month. Asking you guys is my last hope. I wrote a program in C that integrates the 2d Cahn–Hilliard equation using the Implicit Euler (IE) scheme in Fourier (or reciprocal) space: Where the…
Tropilio
  • 1,395
  • 1
  • 9
  • 27
38
votes
4 answers

FFTW vs Matlab FFT

I posted this on matlab central but didn't get any responses so I figured I'd repost here. I recently wrote a simple routine in Matlab that uses an FFT in a for-loop; the FFT dominates the calculations. I wrote the same routine in mex just for…
JustinBlaber
  • 4,629
  • 2
  • 36
  • 57
31
votes
6 answers

Improving FFT performance in Python

What is the fastest FFT implementation in Python? It seems numpy.fft and scipy.fftpack both are based on fftpack, and not FFTW. Is fftpack as fast as FFTW? What about using multithreaded FFT, or using distributed (MPI) FFT?
Charles Brunet
  • 21,797
  • 24
  • 83
  • 124
18
votes
2 answers

Why I cannot override search path of dynamic libraries with LD_LIBRARY_PATH?

Edit: I resolved this issue, the solution is below. I am building a code in a shared computing cluster dedicated for scientific computing, thus I can only control files in my home folder. Although I am using fftw as an example, I would like to…
Mikael Kuisma
  • 302
  • 1
  • 2
  • 9
18
votes
1 answer

How to extract frequency information from samples from PortAudio using FFTW in C

I want to make a program that would record audio data using PortAudio (I have this part done) and then display the frequency information of that recorded audio (for now, I'd like to display the average frequency of each of the group of samples as…
houbysoft
  • 32,532
  • 24
  • 103
  • 156
15
votes
1 answer

How to include compiler flags in Visual Studio Code?

I have a program that I am trying to run in the Visual Studio Code debugger that uses fftw functions. It compiles with the command g++ dimer.cpp -std=c++11 -lfftw3 on the terminal on my computer without complaining about undefined references.…
MattSamm
  • 175
  • 1
  • 1
  • 8
15
votes
3 answers

Problem casting STL complex to fftw_complex

The FFTW manual says that its fftw_complex type is bit compatible to std::complex class in STL. But that doesn't work for me: #include #include int main() { std::complex x(1,0); fftw_complex fx; fx =…
galadog
  • 960
  • 2
  • 10
  • 20
14
votes
1 answer

Recent FFTW wrapper in Java

I'm seeking a minimal Java wrapper for a recent version of FFTW. The wrappers listed on the FFTW website are either out of date (jfftw-1.2.zip) or contain too much extra stuff (Shared Scientific Toolbox). A Google search suggests JFFTW3, which looks…
Kipton Barros
  • 21,002
  • 4
  • 67
  • 80
13
votes
2 answers

How to get FFTW++ working on windows? (for dummies)

I'm using Windows 10 and Visual Studio 2015. In C++, I need to get the Fourier-transform of an image for applying filters on it. It seems that FFTW++ is the ideal solution for this, however I can't get it to compile, and its driving me mad. I'm…
Á. Márton
  • 497
  • 1
  • 3
  • 21
13
votes
3 answers

How to extract semi-precise frequencies from a WAV file using Fourier Transforms

Let us say that I have a WAV file. In this file, is a series of sine tones at precise 1 second intervals. I want to use the FFTW library to extract these tones in sequence. Is this particularly hard to do? How would I go about this? Also, what is…
Sei Satzparad
  • 1,137
  • 1
  • 9
  • 12
12
votes
4 answers

Why do the convolution results have different lengths when performed in time domain vs in frequency domain?

I'm not a DSP expert, but I understand that there are two ways that I can apply a discrete time-domain filter to a discrete time-domain waveform. The first is to convolve them in the time domain, and the second is to take the FFT of both, multiply…
ggkmath
  • 4,188
  • 23
  • 72
  • 129
11
votes
1 answer

How do I use fftw_plan_many_dft on a transposed array of data?

I have a 2D array of data stored in column-major (Fortran-style) format, and I'd like to take the FFT of each row. I would like to avoid transposing the array (it is not square). For example, my array fftw_complex* data = new…
Dylan
  • 201
  • 2
  • 7
11
votes
3 answers

generating correct spectrogram using fftw and window function

For a project I need to be able to generate a spectrogram from a .WAV file. I've read the following should be done: Get N (transform size) samples Apply a window function Do a Fast Fourier Transform using the samples Normalise the output Generate…
Boedy
  • 6,647
  • 1
  • 21
  • 24
10
votes
4 answers

Computing FFT and IFFT with FFTW library C++

I am trying to compute the FFT and then the IFFT just to try out if I can get the same signal back but I am not really sure how to accomplish it. This is how I do the FFT: plan = fftw_plan_r2r_1d(blockSize, datas, out, FFTW_R2HC,…
DogDog
  • 4,820
  • 12
  • 44
  • 66
10
votes
2 answers

How to install the fftw3 package of R in ubuntu 12.04?

I am trying to install the fftw3 package through R console >install.packages("fftw") After this command it is asking to select the cran mirror.I have selected the cran mirror then following error occurs: Loading Tcl/Tk interface ... done Warning:…
Saurabh
  • 867
  • 3
  • 13
  • 28
1
2 3
58 59