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
6
votes
2 answers

Linking FFTW into Matlab Mex file

I am trying to run FFTW code in a mex file. This is strictly for the purpose of development and testing. After some googling, I see that others have tried to do something similar and have had related problems, but I have not found any solutions. …
Todd
  • 475
  • 4
  • 15
6
votes
2 answers

scaling factor for CUFFT

I wrote a simple test program, where I was doing Complex to Complex FT's and I just generated some data 1..50 and stuck it in for the real and imaginary part for each index of the array. When I do an operation like this IFFT(FFT(A)) = A to test them…
Derek
  • 11,715
  • 32
  • 127
  • 228
6
votes
1 answer

Differences between FFTW and CUFFT output

In the char I have posted below, I am comparing the results from an IFFT run in FFTW and CUFFT. What are the possible reasons this is coming out different? Is it really THAT much round off error? Here is the relevant code snippet: cufftHandle…
Derek
  • 11,715
  • 32
  • 127
  • 228
6
votes
1 answer

fortran 2d-FFTW inconsistent with C 2d-FFTW results

I am learning how to handle the FFTW package with fortran. To produce an easily verifiable example, I compute the power spectrum of a 2d plane, which I fill with two distinct superpositioned waves. This way, I know exactly where to expect peaks in…
mivkov
  • 471
  • 5
  • 19
6
votes
2 answers

How to do inverse real to real FFT in FFTW library

I'm trying to do some filtering with FFT. I'm using r2r_1d plan and I have no idea how to do the inverse transform... void PerformFiltering(double* data, int n) { /* FFT */ double* spectrum = new double[n]; …
Kirill Dubovikov
  • 1,457
  • 2
  • 21
  • 41
6
votes
2 answers

Magnitude of FFT result depends on wave frequency?

I'm baffled by the results I'm getting from FFT and would appreciate any help. I'm using FFTW 3.2.2 but have gotten similar results with other FFT implementations (in Java). When I take the FFT of a sine wave, the scaling of the result depends on…
jlstrecker
  • 4,953
  • 3
  • 46
  • 60
6
votes
3 answers

Where to center the kernel when using FFTW for image convolution?

I am trying to use FFTW for image convolution. At first just to test if the system is working properly, I performed the fft, then the inverse fft, and could get the exact same image returned. Then a small step forward, I used the identity…
ZV1
  • 61
  • 1
  • 4
5
votes
1 answer

Is there any practical difference between the FFT and the inverse FFT?

FFT libraries such as FFTW or numpy.fft typically provide two functions fft() and ifft() (and special versions thereof for real valued input). Those functions appear to be defined such that ifft(fft(X)) == X and fft(X) == constant_factor *…
Jan
  • 723
  • 1
  • 11
  • 24
5
votes
1 answer

Linking FFTW into an Android NDK application

I am currently writing a genre classification application as my final year project in Computer Engineering. I initially wrote the feature extraction code (implementing FFTW) in C and now I need to implement it on Android via the NDK. This is my…
JonoCoetzee
  • 969
  • 2
  • 15
  • 30
5
votes
1 answer

How to use the initializer in a Python ThreadPool

I am trying to do threaded convolution using PyFFTW, in order to calculate a large number of 2D convolutions simultaneously. (One does not need separate processes, since the GIL is released for Numpy operations). Now here is the canonical model for…
Alex van Houten
  • 308
  • 3
  • 17
5
votes
3 answers

computing fft and ifft with fftw.h in C

Hi all I am using the fftw C libraries to compute the frequency spectrum for some signal processing applications on embedded systems. However, in my project I have run into a slight hinderence. Below is a simple program I wrote to ensure I am…
digiphd
  • 2,319
  • 3
  • 23
  • 22
5
votes
0 answers

How can I change fftw plan(execute) array size?

I need your help. I defined array and plan in my main cpp. Then, I put the data in the array and do fftw execute in my sub cpp. sub cpp is in the thread, that is looped. I defined array size enough because the number of data is dynamic. but fftw is…
Rinascita
  • 61
  • 1
5
votes
2 answers

Normalising FFT data (FFTW)

Using FFTW I have been computing the FFT of normalized .wav file data. I am a bit confused as to how I should normalise the FFT output, however. I have been using the method which seemed obvious to me, which is simply to divide by the highest FFT…
ChrisM
  • 61
  • 1
  • 3
5
votes
1 answer

Numerical error building up when computing derivative of function repeatedly with FFT

I have written a C program that uses FFTW to compute derivative (repeatedly) of a function. I am testing for simple sin(x) function. Each step computes the derivative of the answer of the previous step. I am observing that the error builds and after…
Amit
  • 113
  • 1
  • 1
  • 5
5
votes
2 answers

How to use FFTW library in cmake?

I have C++ code which uses FFTW 3.3.4. Ubuntu 16.04, cmake version 3.7.2 $ locate…
Maxim
  • 75
  • 1
  • 1
  • 8
1 2
3
58 59