# Questions tagged [fourier-transform]

For questions about Fourier transforms, how they are used, and implementation details.

102 questions
Filter by
Sorted by
Tagged with
3k views

### Fourier pseudo-spectral method and numerical dissipation

Performing a direct numerical simulation of isotropic turbulence with Fourier pseudo-spectral method (Orzag & Patterson, PRL, 1972) using FFT. For a background of the method, which is widely used ...
• 419
10k views

### Least Squares and Fourier Series

I have a little bit of problem figuring out the relation between Fourier series and Least Squares. As far as I understand, LS is a way of minimizing the quadratic error between a measured value $y_i$ ...
• 1,019
2k views

### Computing numeric derivative via FFT - SciPy

I wrote the following code to compute the approximate derivative of a function using FFT: ...
3k views

### Fourier Transform of function in Spherical Harmonics

I have a function $f(r,\theta,\phi)$ which I am expressing in terms of spherical harmonics $$f(r,\theta,\phi) = \sum_{l=0}^{\infty} \sum_{m=-l}^{l} g_{l,m}(r) d_{l,m}(\theta,\phi)$$ where $d_{l,m}$...
• 2,109
16k views

### C++ libraries for Fast Fourier Transform in high precision

I am looking for a C++ library for Fast Fourier Transform (FFT) in high precision (e.g., using high precision real data types similar to mpfr_t in MPFR or ...
• 216
124 views

### Discrete sine and cosine transform for mixed derivatives

Using sine and cosine transforms to solve Poisson's equation with Dirichlet boundary conditions seem quite standard nowadays (see, e.g., here or Table 2 in this paper). In the case of Poisson's ...
• 71
851 views

### Help with Fourier beam propagation method

I am working on implementing the Fourier beam propagation method in C++. I am really more of a programmer than a physicist but I think I have a good understanding of what I am trying to do. Here is ...
• 173
487 views

### Why not use the convolution theorem for explicit timestepping?

Consider the advection equation \begin{equation} \frac{\partial C}{\partial t} + u\frac{\partial C}{\partial x} + v\frac{\partial C}{\partial y} = 0 \end{equation} I want to do a forward time, center ...
• 141
751 views

### How to use matlab command 'fft' to solve Ax=b arising from Poisson equation?

I want to ask a question about fast solver to the Poisson equation with Homogenous boundary conditions as follows: $$-\Delta u = f.$$ After centered difference using $n+2$ equidistance points in all ...
• 971
177 views

### How to define a dimensionless Objective function for determining how peaked a curve is?

I have attached 2 plots for FFT spectra. One is considered good and one is bad. The good one is classified on the basis of how closely spaced the frequencies and the bad is based on how multiple ...
406 views

### How to calculate efficiently and accurately the Fourier transform of a radial function in Fortran

As my question states, I want to calculate the Fourier transform $F(q)$ of a radial function $f(r)$ (defined on $[0,\infty)$ and which decays like an exponential $\exp(-Ar+b)$ at large $r$) as ...
• 175
179 views

• 131
346 views

### MPI support for discrete Fourier transform (DFT) in Python

I am looking for a discrete Fourier transform (DFT) library that can be run with MPI on Python. Usually, in other languages (C, Fortran) FFTW is used. There's a Python wrapper for FFTW called pyFFTW, ...
• 215
194 views

### How to get Fourier transform of Fisher-Kolmogorov?

How can I use Fourier Transform to solve Fisher-Kolmogorov Equation in 1D? \begin{equation} u_t(x,t) = u_{xx}(t) + u(1-u) \end{equation} \begin{equation} u(0,x) = \phi(x) \end{equation} with ...
• 289
41 views

### 3D Cooley-Tukey FFT

To compute the $N$-point DFT $$X[k] = \sum_{n=0}^{N-1} x[n] W_N^{kn}$$ where $N = N_1 N_2$, we can write the indices as $n = N_2 n_1 + n_2$ and $k = k_1 + N_1 k_2$, (effectively packing the data ...
• 31
363 views

### How to obtain values in physical space for a given spectrum?

My question falls under purview of turbulent flows. I want to add an initial perturbation, for which I have a given energy spectrum (say$E(k)=ak^4e^{-bk^2}$). The steps involved in getting these ...
• 83
942 views

### Numerically computing the advection equation

I am trying to write a program to compute the advection equation. $$u_t +u_x = 0$$ I use the spectral method for the spatial derivative $u_x$ and the leapfrog method for the time derivative $u_t$. ...
• 123
545 views

### How do I avoid divide-by-zero when solving the Poisson equation with Fourier transforms?

I wanted to try to implement part of the method in the following article using Fourier transforms. http://www.shodor.org/media/content/jocse/student_submissions/nocito2010/nocito2010_pdf Right now I ...
• 173
165 views

...
725 views

### Calculating high-order derivatives using FFT in Matlab

I'm trying to calculate the derivative of a function using FFT in Matlab. I've coded the following function to calculate it: ...
• 21
122 views

### Fourier spectral method for coordinate transformed heat equation

As the title said, I want to solve a coordinate transformed heat equation using fourier spectral method. In particular, I am interested in transforming an uniform grid into an adaptive non-uniform ...
• 109
516 views

### Incorporating a potential barrier in a wave-packet simulation (Fourier Transform method)

I'm trying to simulate the scattering of a wave-packet at a potential barrier in Python. I'm using a Fourier Transform method (not sure if its the same as the Split-Step method), where I apply Fourier ...
72 views

### FFT of "implicitly" uniform data

I am trying to take a Fourier transform of a density field estimated from mock galaxy survey catalogs. Basically, you start with a list of galaxy positions, then you bin these positions over some ...
• 133
43 views

### Padding length and error analysis of discrete convolution by FFT

The standard algorithm for discrete convolution of two vectors $x\in \mathbb{R}^{n}$ and $y \in \mathbb{R}^{m}$ is (in essence) a FFT of the two input vectors, multiplication of the two elementwise, ...
• 2,031
165 views

### Approximating improper integral with FFT

In d'Halluin et al. (2005) (http://imajna.oxfordjournals.org/content/25/1/87.short) the authors claim that the correlation integral $$I(x) = \int_{-\infty}^{\infty} V(x+y) f(y) dy$$ can be ...
• 21
18 views

### Normalising DFTs Correctly

I have been playing around with convolutions in scipy's signal package: ...
• 21
30 views

### Palmprint Identification - Why do we align the images before we use the Fourier Transform?

I am currently reading the paper PALMPRINT IDENTIFICATION BY FOURIER TRANSFORM by WENXIN LI, DAVID ZHANG and ZHUOQUN XU about identifying persons based on an image of their palm, one version of the ...
• 121
99 views

### Fusing callbacks with FFTs: an open-source GPU FFT implementation?

I'm using cuFFT to do some 2D FFTs on matrices of size 2048x2048 or larger. The FFTs are preceded and followed by various scaling operations. These scaling operations are memory-bound, so they take ...
• 3,131
236 views

### Solving a 3D (almost radial) convolution with FFT

I have a 3D integral that is almost a radial convolution of the form $$\int d^{3}k'h(\mathbf{k'})g(|\mathbf{k-k'}|)$$ and I am looking for a fast and efficient algorithm (e.g. FFT) to solve it ...
• 21
223 views

### Amplitude at a given frequency in a wide band signal

Could anyone suggest the most computationally efficient method for finding amplitude at a given frequency having a noisy wide band signal. To be more specific about a task. I have some physical ...
• 121
45 views

### Constructing 2 fold oversampled cosine basis in MATLAB

So I'm trying to construct a 2 fold oversampled cosine basis in MATLAB. I know how to construct the basis as a square matrix using the following command: ...
• 21
827 views

### Fast Forward Laplace transform

There are examples for fast numerical inversion of the Laplace transforms. For example here: http://www.mathworks.com/matlabcentral/fileexchange/32824-numerical-inversion-of-laplace-transforms-in-...
• 121
1 vote
### Fast way to compute integral of type $\int dx f(x) \cos(n \pi x)$ in SciPy
I have an integral of the form $$I(n) = \int_0^1 dx f(x) \cos(n \pi x) ,$$ where $n$ is an integer. In other words, I calculate the cosine Fourier coefficients of function $f$, which is real and ...