# Questions tagged [fourier-transform]

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

109 questions
Filter by
Sorted by
Tagged with
1 vote
62 views

### Numerically computing envelope of Gibbs oscillation

If I numerically compute the envelope of $\sin(\pi t)$ using a Hilbert transform, I obtain exactly what I expect: If I do the same for $\mathrm{sinc}(t)$, still I obtain an envelope which agrees with ...
67 views

### How to plot the power spectrum

I have an array of data whose columns are solution vectors to a system of ODEs at a specific time. I want to plot the power spectrum of a solution at a specific time, but when I attempt this I get ...
57 views

### Numerical integration in Fourier space over 3D grid

I am attempting to implement a model outlined in this paper: General magnetostatic shape–shape interactions Background This model allows the calculation of magnetostatic interaction energies between ...
131 views

### Fast Fourier Transform on Meshes

I have a (closed, manifold, oriented) triangular mesh for which I build a matrix $L\in\mathbb{R}^{n\times n}$ discretising the negated Laplace-Beltrami operator. The matrix $L$ is symmetric positive ...
67 views

### Complex matrix logarithm discontinuity by solving inverse Fourier integral by alternative method to FFT

NOTE: This code is a piece of code I am using for a master's thesis, so I do not expect someone to do the work for me, but I gladly accept suggestions of any kind. However, I am trying to get the ...
146 views

### Helmholtz decomposition of a vector field in Fourier space with Python

I have a 3D vector field and I want to extract its divergence-free part (also called transverse component), using the Helmholtz decomposition. In principle, this can be done in the Fourier space, as ...
1 vote
41 views

### Spectral Intensity of complex signal

I'm simulating an electromagnetic wave that has a real and imaginary part. Something like: $$E(x,t) = A(x,t) e^{-i(\omega t - k x)}$$ Where $A(x,t)$ is some complex amplitude. Then taking the ...
41 views

### Numerical solution of nonlinear water wave equation with Dirchlet-Neumann operator

I've been trying now for quite some time to numerically solve the nonlinear water wave equation [Craig and Sulem, JCP (1993)] by using FFT to discretize the space. I present my code below. By testing ...
70 views

### How to accelerate a convolution (laplace kernel) with FFT

I have the following computation I'm trying to program and accelerate with the FFT. $$\phi(x) = \sum_{y \in Y} K(x, y) q(x), \> \> \forall x \in X$$ Where $X$ and $Y$ are sets of Cartesian ...
91 views

...
70 views

### Deviation between Analytic DFT and FFT in Python

Within my work, I am trying to compare analytically retrieved power spectra with ones calculated from fft packages in python. The problem I have, is that the analytic form of the peaks I derived does ...
1 vote
185 views

### How to get the inverse FFt in this Fortran code?

I find this fft algorithm on the link The code looks simple and easy to implement. But it does not have inverse fast Fourier transformation. A brief search on the internet shows that to get the ...
21 views

### Is it possible to realign sliding-window FFT-filtered output on time-line with the original signal when it is used for noise-filtering in real-time?

In real-time systems, an output data can be taken into sliding-window Fourier Transformation directly without waiting for new data. Then Fourier Transformed data can be altered (remove high ...
1 vote
133 views

### Free Time Dependent Schrodinger Equation with Inhomogeneous Dirichlet boundary

There exists a FFT-based method to solve the poisson equation in inhomogeneous Dirichlet boundary condition using the sine-transform. For example, Which fourier series is needed to solve a 2D poisson ...
1 vote
169 views

### Computing convolution on non-uniform sample

How to efficiently convolve the function $h(t)=H(t)e^{-t}$ with a function $x(t)$ sampled non-uniformly, i.e. $\{x(t_0), x(t_1), ..., x(t_{N-1})\}$? $H(t)$ is the Heaviside step function, and the ...
105 views

### How to take the Fourier transform of a Fibonacci chain in a Python script?

This may be an easy question to answer but I am really stuck. In several topics (especially that of quasicrystals) the Fibonacci chain's Fourier transform and diffraction pattern is mentioned. Despite ...
243 views

### Does DCT diagonalize the FD discretisation of the Laplacian with Neumann boundary conditions?

If one has the Poisson problem (assume $\int_{\Omega} f = 0$ and $\int_{\Omega} u = 0$): \begin{alignat}{3} \Delta u(x) &= f(x), &\quad&x\in\Omega \\ \partial_nu(x) &= 0, &\quad&...
93 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, ...
1 vote
137 views

### Deconvolution of sinc function in spectrum calculation in FTS

In Fourier transform spectroscopy (FTS) I am calculating a broadband interferogram (e.m. frequency 190-300 GHz top-hat), then back-retrieving the spectrum by FT. Here in the figure, you can see the ...
1 vote
303 views

### How to perform FFT from plane-wave basis function coefficients to real space?

I have a 3D grid in real space of grid spacing $L$ and say 21 grid points in each direction, containing e.g. a charge distribution. This is stored as a numpy array of shape ...
422 views

1 vote
6k views

### Understanding why scipy.fft.fft (fast Fourier transform) doesn't work as expected

I write the following fast Fourier transform code into my Python notebook expecting to see a plot wherein there's a spike at $1/2\pi$ since that's the frequency of the sin function, but instead I get ... 503 views

283 views

### Problem implementing convolutions exactly with the FFT

I'm trying to perform convolutions as defined mathematically $f \star g (\tau)= \int_{\mathcal{R}}f(t-\tau)g(t) dt$ in a numerical simulation. Hence, my signal is a sampling of points $f(x_i)$. I ...
147 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 ...
1 vote
87 views

### Advantage of fractional Fourier transform over multiscale wavelet?

What could be the arguments of using fractional Fourier transform instead of multiscale wavelet for data analysis ? Optimization of the good time-frequency domain parameter? good in the sens of best ...
223 views

### Computation of triple nested loops as a convolution product?

I'm trying to compute efficiently the following \begin{equation} A_j = \sum_{l'=1}^{\infty}\sum_{k= 0}^{K-1} L_{l'}T_ke^{2\pi i \frac{k}{K}j}\epsilon_{l',k} \end{equation} for \$j = 0,1, \ldots, K-2,K-...
1 vote
49 views

### FFT convolution works only with certain domain length

in my quest to understand how I can use FFT to compute integrals (see my other question click, still no answer there), I came across the fact that a convolution of two functions can be calculated by ...
1 vote
109 views

...
22 views

### Normalising DFTs Correctly

I have been playing around with convolutions in scipy's signal package: ...