Stack Exchange Network

Stack Exchange network consists of 174 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-transform]

The tag has no usage guidance.

1
vote
0answers
43 views

The sign of Schrodinger equation

I have a question for the format of Schrodinger equation $$\psi(x,t) = \int_0^\infty c_n e^{-iE_nt/\hbar} \psi_n(x)$$ Why do we have $i$ instead of $-i$?
2
votes
1answer
41 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 ...
5
votes
0answers
46 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
31 views

What is the inverse Laplace transform algorithm that is most accurate given the fewest frequencies considered?

Based on your empirical knowledge. This paper suggests a nonlinearly accelerated Fourier series approach, such as the one proposed here, but I have one constraint: we should be able to express the ...
0
votes
2answers
91 views

How to solve diffusion equation in Fourier space when mobility is not constant

I want to solve non-classic diffusion equation in Fourier space. The equation is $$∂c/∂t=-∇.J$$ Where $J$ is $$J= -M.∇μ$$ Where M is mobility. It depends on c and $\mu$ is $$ μ= g(c) - \nabla^2c $$ ...
0
votes
1answer
190 views

High precision Discrete Fourier Transform in c

I'm trying to do a high precision discrete fourier transform on a signal. To examine the precision, I use a gaussian function as the signal, because the fourier transform is also a gaussian function. ...
1
vote
0answers
77 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. ...
1
vote
1answer
51 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
63 views

Can x-ray back-projection be converted to hard-field magnetic induction tomography?

This is a question about hard-field back-projection as used in x-ray tomography, applied magnetic induction tomography. Al-Zeibak and Saunders have shown that x-ray filtered backprojection can be ...
1
vote
0answers
49 views

Beam propagation over extremely short distances

I like to simulate the free-space propagation of an electric field (beam radius ~ 1-10 cm) over extremely short distances (~ 5-10 cm). The reason is that the field is focused by a lens with a very ...
0
votes
1answer
137 views

Hankel transform from paper works only for certain functions

I implemented an algorithm for solving the Hankel transformation based on a paper. My problem is: It works very good for the functions suggested in the paper (as test functions), it works pretty ok ...
0
votes
0answers
59 views

How to do FFT transform on unequal spaced data points? [duplicate]

How to do FFT transform on unequal spaced data points using Mathematica or Origin? My data is similar with Figure a, but the data points are unequal spaced. Does anyone know how to do FFT transform ...
2
votes
1answer
148 views

Power spectrum incorrectly yielding negative values

I have a real signal in time given by: And I am simply trying to compute its power spectrum, which is the Fourier transform of the autocorrelation of the signal, and is also a purely real and ...
3
votes
2answers
745 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
63 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
1answer
749 views

Fast(er) computation of dot product of two convolutions?

Let $a,b,c,d\in\mathbb{R}^n$. Is it possible to compute $$\langle a*b,c*d\rangle$$ faster than 6 FFTs? I can do it with 6 FFTs by doing normal convolutions, 3 FFTs each. In my application I know $b, ...
3
votes
2answers
221 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 ...
0
votes
2answers
191 views

Generating initial velocity field

I am trying to generate initial velocity field which satisfies incompressible flows condition. To formulate this I am using Rogallo's procedure formulation which is given by $$ \tilde{u}(k) = \frac{\...
1
vote
0answers
63 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
0answers
144 views

Python DFT library using MPI

I am looking for a discrete Fourier transform (DFT) library that can be run with MPI on Python. Usually, in other language (C, fortran) FFTW is used. There's a Python wrapper for FFTW called pyFFTW, ...
3
votes
1answer
137 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 ...
3
votes
0answers
137 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 ...
2
votes
3answers
168 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 ...
4
votes
2answers
7k 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 ...
3
votes
1answer
230 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
153 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
554 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$. ...
5
votes
1answer
408 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 ...
3
votes
0answers
239 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 ...
1
vote
0answers
374 views

3D plot from Fourier coefficients in Matlab

I would like to construct a surface on a 2D mesh, given a set of Fourier coefficients for the original function $V(x,y)$. Given some $\mathbb{K}\subset \mathbb{Z}^2$ I have a partial double sum of a ...
-2
votes
1answer
338 views

Understanding and implementing the Fast Fourier Transform

I need to write the fast fourier transform in C++ and I am referring to this formula from wikipedia: But for some reason I am not getting the correct output when I simply enter (1,1) (1,1) (1,1) (1,...
3
votes
1answer
51 views

Hankel transform with high accuracy

Short version I'm computing the zero-order Hankel transform of a function $f(r)$, $$F(k) = \int_0^\infty f(r)J_0(kr)r\,\mathrm{d}r$$ I know $f(r_n)$ at selected $r_n$ but it is impractical to compute ...
2
votes
0answers
41 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: ...
3
votes
1answer
138 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 ...
2
votes
0answers
288 views

My calculated laser pulse duration is too large. Where am I wrong?

I am currently writing a small Python script to estimate the pulse duration from the optical spectrum. At the end, the idea is to observe the effects of the spectral phase on the pulse duration and ...
1
vote
1answer
348 views

FFT on non-orthogonal lattice ( for computing convolutions and solving PDEs )

I saw many examples of application of FFT for computation of convolutions and solving PDEs ( like Poisson equation ). It is very strightforward and efficient if I work with rectangular (orthogonal) ...
3
votes
1answer
229 views

precision loss in non-trigonometric, periodic functions using FFTW and NaNs after marching forward in time (Fortran)

I have developed a pseudospectral solver of the Navier-Stokes equations using FFTW. I tested my formulation of right hand sides (RHS) of the NS equations against standard trigonometric functions (...
2
votes
0answers
221 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-...
0
votes
1answer
39 views

Particle mesh Ewald: recommended splitting into short and long range

Particle mesh Ewald method for acceleration of solving pairwise interaction by long range forces (electrostatic, gravitational ... ) seem to be very general and easy to implement. The basic principle ...
1
vote
0answers
127 views

Am I using the incorrect implementation of the fast Chebyshev transform?

I was told that the fast Chebyshev transform has superior spectral convergence, but I am unable to verify its rumored convergence. I was given plots of its spectral convergence, where the signal's ...
2
votes
1answer
435 views

FFT convolution vs direct convolution

Recently I tried to compare results for 1D direct convolution and convolution via FFT. I expected to get absolutely the same result, however I faced with a problem that results are different, ...
1
vote
1answer
68 views

Coordinate transformations and analytic form of non-uniformly gridded fourier transform

My question concerns coordinate maps and non-equally spaced fourier transforms. I have dependent variables $(X(\xi),Y(\xi))$, where $\xi\in(0,2\pi)$. In general, $Y$ is assumed even and expanded as a ...
0
votes
1answer
576 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,...
0
votes
1answer
181 views

Diagonalize a circulant-plus-rank-one matrix

Suppose $A=uv^T$ where $u$ and $v$ are non-zero column vectors in $\mathbb{R}^n, n\geq 3$. $\lambda=0$ is an eigenvalue of $A$ since $A$ is not of full rank. $\lambda=v^Tu$ is also an eigenvalue of $A$...
4
votes
1answer
389 views

Two approaches to solving diffusion equation in Fourier space

I want to numerically solve the diffusion equation $\partial_t u = D \partial_x^2 u$ in Fourier space, and can think of multiple ways to do it. Setup Option 1 Differentiating $u$ twice in Fourier ...
2
votes
1answer
478 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: ...
1
vote
1answer
149 views

How to do Fast Fourier transform (FFT) for singular functions?

I want to do a 3-dimensional FFT on this function $\frac{\cos (x) \cos (y) \cos (z)-\sin (x) \sin (y) \sin (z)}{\left((1.0001+\sin (y)+\cos (z))^2+(0.0001+\cos (x)+\sin (z))^2+(0.0001+\sin (x)+\cos (y)...
7
votes
2answers
5k 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
vote
3answers
175 views

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 ...
3
votes
2answers
806 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}$...