Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [fourier-analysis]

Questions on the computational aspects of Fourier analysis, including the various applications of the fast Fourier transform (FFT).

2
votes
0answers
18 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 ...
2
votes
2answers
134 views

Generate high n quantum harmonic oscillator states numerically

How can I generate the higher $n$ quantum harmonic oscillator wavefunction (in position space) numerically? Here, higher means around $n=500$, or say $n=2000$, where $n$ is the $n$th oscillator ...
0
votes
3answers
73 views

Rudin lecture — if f(x) is not integrable on some interval, does it not have a Fourier Series expansion on that interval?

I found an old lecture on YouTube given by Walter Rudin (1990, in Wisconsin), and towards the beginning he mentions that if $f(x)$ were not integrable, on some interval, it would be obvious that it ...
1
vote
0answers
58 views

What does the Jackson Kernel measure?

A certain filter I'm writing uses two different kernels. The Fejer kernel (which is common) and the Jackson kernel: $$ \Delta_T(x) = T \,\left( \frac{\sin \pi T x}{\pi T x}\right)^2 \quad\text{and}...
1
vote
0answers
40 views

FFTW on subarray with MPI

With the guru interfaces of FFTW, I can apply transforms only to parts of a multidimensional array by modifying the fftw_iodim ...
1
vote
0answers
31 views

How to numerically transform a 2D Fourier spectrum with arbitrary frequency shift to center frequency?

Suppose $F(u,v)$ is the center frequency Fourier representation of some $f(x,y)$ in 2D. $$ f(x,y)=\int\limits_{-\infty}^{\infty}\int\limits_{-\infty}^{\infty}F(u,v)e^{2\pi i (xu+yv)}dudv $$ In ...
5
votes
0answers
52 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 ...
1
vote
0answers
70 views

Error propagation through a FFT

If I take the fourier transform of data x +/- sigma is there a standard approach to what the error in the outputs will be? Would the best way be direct evaluation of the upper and lower bounds?
1
vote
0answers
92 views

Fourier transform spherical system

I need to take the Fourier transform of a 3D function $h(r)=h(|r|)$ so that I can invert a convolution problem. What is the best way to do this with Python? I know the the FT is equivalent to a sine ...
1
vote
0answers
85 views

Code for solving the heat equation on the semi-infinite rod

Cross posted in mathematica.SE. Question : I want to test the solution which is given below is right by Matlab/Maple/Mathematica. Please look the post in mathstackexhange or Please look below. ...
7
votes
1answer
159 views

Fourier characteristics of repeated numerical derivative

Background I am trying to analyse fourier characteristics of a derivative. For example if I have a first order derivative approximated as following: $$\frac{\partial \Psi(x)}{\partial x} = \frac{\...
3
votes
0answers
86 views

Precision not improving by decreasing step-size in nonlinear Schrödinger

I tried to simulate soliton propagation by solving the nonlinear Schrödinger equation using the split-step Fourier method. The following is an example of the Matlab code copied from a textbook. ...
2
votes
2answers
169 views

von Neumann stability analysis for spatial variable flux

Can we use the von Neumann stability analysis to investigate the stability of the discrete form of the following problem? $$u_t+\frac{\partial(x^2u)}{\partial x}=S(u,x)\ .$$ Please give some hint ...
1
vote
1answer
55 views

fft with non uneven spacing between the value of the signal

I am trying to implement in C or C++ a solution for a fft and Ifft when the signal values are not obtained at a constant rate, making it having a desviation between the values and the periodic ones. I ...
1
vote
0answers
197 views

1d turbulent energy spectra in homogenuous direction (non-isotropic)

I am trying to compute the one-dimensional energy spectra for my channel-flow simulation. I have already written a post-processing script to achieve this, however I need to validate my code before ...
1
vote
0answers
41 views

Perfect filtering of high frequencies in 2D FFT (Multidimensional 2/3 Rule)

Let $u_n$ be an array containing discrete values of the function $u(x,y)$. Performing a 2D FFT to this array we obtain $\hat{u_n}$ representing the values of $\hat{u}(k_x,k_y)$. I would like to ...
5
votes
1answer
546 views

Von Neumann stability analysis with a constant term

I have a question concerning the von Neumann stability analysis of finite difference approximations of PDEs. There seem to be a wealth of online source explaining the application of this stability ...
4
votes
0answers
56 views

How to do numerical computation of $L^p$ norm of a $p$ dimensional trigonometric polynomial

Id like to know methods for numerical computation of $L^2$ norm of a two dimensional trigonometric polynomial. I have the coefficients. If I want to compute the L^1 norm, I can do so by sampling in ...
1
vote
2answers
460 views

MATLAB FFT Differentiation

I am trying to implement the Laplacian operator using Fourier Transform differentiation (https://en.wikibooks.org/wiki/Parallel_Spectral_Numerical_Methods/...
1
vote
0answers
49 views

Can convolution be generalized to 2D from several 1D convolutions?

I have a function $\mu(x)$ that I need to convolve with several functions $\nu_n(x)$. I'm currently taking the DFT of $\mu$ and multiplying it individually with the N DFTs of the functions $\nu_n$ and ...
4
votes
1answer
358 views

Split operator method

I am new to the field of computational physics and have a couple of questions regarding solving the non-linear Schrödinger equation using Operator splitting. 1) If the hamiltonian is of the form $H=\...
1
vote
1answer
57 views

nodal lines of wave-function $\psi(x,y) = \sin 12x \sin y + (1 + \epsilon) \sin x \sin 12y$

I am trying to reproduce this figure of nodal lines of a wavefunction from this work of Berry $$\psi = \sin 2r\,x \sin y + (1 + \epsilon) \sin x \sin 2r\,y$$ Here the image. The first is $\epsilon = ...
3
votes
2answers
843 views

Fourier transform by FFT : by using cubic splines to interpolate between data points, do we change the frequency content of the Fourier transform?

I have a data file with some points equally spaced. These represent some function. I have to calculate the Fourier transform of this set of points. The thing is, I'm tempted to take a cubic spline of ...
0
votes
1answer
72 views

0 Hz (quite sharp) peak in FFT and division by 0

In a previous question, link, I asked about how I could most effectively do a Fourier Transform of a radial function given at certain values and which we knew the asymptotical behaviour of. The ...
3
votes
2answers
252 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 ...
1
vote
0answers
66 views

Spherical Harmonics: band-limited representations of a vector field on a sphere

I have used pyShtools in the past to expand scalar functions to spherical harmonics and to synthesize band-limited representations of them. However, I am not too sure how to achieve this for a vector ...
1
vote
1answer
193 views

Convolution of two real functions using discrete Fourier transform (FFT): zero-padding and normalization

I want to obtain the convolution of two discretized real functions $f$ and $g$, $$ c(t) = \int_{-\infty}^{+\infty} \mathrm{d}{x} \, f(x) \, g(t-x) \tag{1} $$ via discrete Fourier transform (DFT). As ...
0
votes
1answer
485 views

How do I solve Laplace's equation in 2D using spectral methods?

I want to solve the 2D Laplace's equation: $$ \frac{\partial^2 T}{\partial x^2 } + \frac{\partial^2 T}{\partial y^2 } = 0 $$ with boundary conditions: T(x=0)=T(x=1)=T(y=1)=0 and T(y=0)=1 on a ...
3
votes
0answers
37 views

Finding errors in frequency from a Fast Fourier Transform from Gaussian fitting

I took a FFT of sound in a box generated by a frequency sweep over a range of frequencies, and have an array of frequencies and their corresponding FFT amplitudes. According to models for the ...
3
votes
1answer
249 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 ...
1
vote
0answers
170 views

Numerically computing Viscous Burger

I am trying to solve the Viscous Burgers equation using the spectral method. $$u_t+uu_x = Du_{xx}$$ where $D$ is a constant (chosen to be zero) and with the initial condition $$u(x,0) = exp(-x/0.2)^2$$...
3
votes
1answer
607 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$. ...
3
votes
0answers
72 views

Does there exist a Fourier transform algorithm for perturbed data?

Assuming I have a length-$n$ real vector $x$ and have already computed its Fourier transform $\hat x$ (in time $O(n\log n)$), I would like to compute the Fourier transform of $y = x + \delta x$, where ...
5
votes
1answer
251 views

Does this Algorithm (probably Fourier like) Exist for 2D Shapes? [closed]

Update: Someone changed the title to this post to a possible answer ("Fourier decomposition of parametric shapes") but I changed it to a different title as that makes it clear what I was asking. As I ...
1
vote
2answers
631 views

Fourier techniques and periodic boundary conditions

Could somebody explain to me why periodic boundary conditions are automatically satisfied if you solve your problem assuming a Fourier series? So, if we assume a Fourier series for our solution, we ...
7
votes
1answer
365 views

Solving a simple Schroedinger equation with Fast Fourier Transforms

While trying to solve a stochastic Gross-Piaevskii equation I have found a problem that can be tracked down to something buggy occuring in the simplest Schrodinger equation possible: $\partial_t \psi ...
3
votes
0answers
91 views

FFT-based Image Rotation Algorithms More Accurate Than Chirp-Z?

We're currently using a Chirp-Z based implementation: R. W. Cox and R. Tong, "Two- and three-dimensional image rotation using the FFT," IEEE Trans. Image Processing, vol. 8, no. 9, pp. 1297–1299, Sep....
4
votes
1answer
122 views

Computing Fourier representation of space dependent advection operator via FFT

Consider the following equation on the circle: $$\dfrac{\partial p(x,t)}{\partial t} = a(x)\dfrac{\partial p(x,t)}{\partial x} \equiv L(p) \enspace ,$$ where $L$ is the operator acting on $p(x,t)$. ...
3
votes
0answers
58 views

Broadening spectral data by using FFT's

I obtain numerical discrete data of the form $$ S_{raw}(\omega) = \sum_{j}w_{j} \delta(\omega-\omega_{j}) $$ to compare the result with experimental data the delta peaks need to be broadened ...
2
votes
1answer
129 views

Bounded Input Boundaed Output stability for heat equation. Proof or Counter example?

I am interested in proving or obtaining a counterexample to the following conjecture. Let $\Omega\in \mathbb{R}^d$ be a bounded open domain. Let $u_d\in H^{1/2}(\partial\Omega) \times \mathbb{R}^+$. ...
7
votes
2answers
199 views

Enforcing non-negative constraint in fourier-spectral method

I have a PDE optimization problem, and a scalar field (which I am optimizing over) is supposed to be nonnegative everywhere in the domain. Since I am working in Fourier space for solving this problem ...
5
votes
1answer
177 views

Complete (an incomplete) explanation of the phenomenon of “aliasing”, when using Fourier series to approximate functions?

Consider the approximation of a function by a truncated (finite) Fourier series, using complex notation: \begin{equation} f(x) \approx F_M(x) = \sum_{\alpha = -M}^{M} \hat{f}_{\alpha}e^{-i\alpha x} \...
5
votes
3answers
380 views

Variable viscosity Stokes equation

One very efficient way to solve Stokes equation with periodic boundary conditions \begin{equation} -\eta \nabla^{2} \bf{v} + \nabla p = f \\ \nabla \cdot \bf{v} = 0 \end{equation} is using the ...
3
votes
1answer
143 views

Approximate $h$ in $F(\theta)=\sin \theta \int_{-L}^{+L}h(z)e^{-ikz\cos \theta} \,dz$

Consider $$F(\theta)=\sin \theta \int_{-L}^{+L}h(z)e^{-ikz\cos \theta} \,dz$$ $$|z|\le L$$ $$0 \le \theta \le \pi$$ By having knowledge of $F(\theta)$, how can one approximate $h(z)$? In addition, I ...
4
votes
1answer
91 views

Zero-k mode in Pseudo-spectral solution of Stokes Flow

I'm trying to solve a Stokes flow problem with a pseudo-spectral method in periodic boundary conditions. The equations of interest are $-\nabla^2 \bf{v} + \nabla p = \bf{f} \\ \nabla \cdot \bf{v} = ...
8
votes
2answers
1k views

Quick and simple discrete 2D Helmholtz-Hodge Decomposition using FFTs?

For a silly screen saver I'm trying to develop, I'd like to randomly generate a divergence-free 2D array of 2D vectors, and then use it to generate a line integral convolution plot. I've heard$^1$ ...
0
votes
1answer
614 views

Scaling factor of the inverse Fourier Transform (for convolution purposes)

I have a certain 2-D function. More properly, I have not the function itself, but the matrices $[X,Y,Z]$, where $X,Y$ are $1\times n$, and $Z$ is $n \times n$. Now, I want to calculate a a new matrix,...
1
vote
1answer
370 views

3D Poisson equation, Fourier and Chebyshev

I am currently trying to solve the 3D Poisson equation with a Chebyshev discretisation in the $z$ direction (from -1 to 1) and Fourier in the $x$ and $y$ (from $-\pi$ to $\pi$) I have taken the code ...
1
vote
1answer
120 views

How can DFT of a two dimensional array be found using program for one dimensional DFT in C?

I have the program four1.c from Numerical Recipes in C to calculate the Discrete Fourier Transform (DFT) of a one dimensional array. I want to calculate the DFT of ...
6
votes
1answer
173 views

What spline functions are used in Section 13.9 of “Numerical Recipes in C”?

I asked a similar question on MathSE but with more added fluff, but didn't really get any straight answers, so I figured I'd ask here. Computing Fourier coefficients of a function using the FFT is ...