Questions tagged [convolution]

For questions about applying convolutions to data. This can include the process of convolving two functions together or seeking a kernel matrix to convolve with a grid of data (often done in image processing).

Filter by
Sorted by
Tagged with
1 vote
0 answers
26 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 ...
user avatar
  • 61
4 votes
3 answers
479 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 ...
user avatar
  • 141
1 vote
0 answers
133 views

Numerical evaluation of Duhamel's integration

I am trying to numerically evaluate the following Duhamel's integration: $$ x = \frac{-1}{\omega_d} \int_0^t \ddot{x}_g (\tau) e^{-\zeta \omega_n(t - \tau)} \sin{\left( \omega_d (t - \tau) \right)} d\...
user avatar
0 votes
1 answer
68 views

What's the relationship of machine learning and mechanical simulation?

What's the relationship of machine learning and mechanical simulation? Particularly, machine learning is about learning from a large sample and predicting based on filters tuned on that. Mechanical ...
user avatar
  • 389
3 votes
3 answers
389 views

Convolute a gaussian kernel with a large array of off-grid centroids without looping? (how to make "A Thousand (Gaussian) Points of Light" )

For a finite object size diffraction simulator, I need to generate arrays which are the sum of thousands of instances of a Gaussian (or other) 2D kernel at centroids that will not fall in any ...
user avatar
  • 852
1 vote
1 answer
204 views

How to generate the convolution of f(x, y) with a parametric function g(t), x(t), y(t) in Python? (Something better than this brute-force sum)

The answer to Convolute a gaussian kernel with a large array of off-grid centroids without looping? (how to make "A Thousand (Gaussian) Points of Light" ) involves summing a 3D array over ...
user avatar
  • 852
0 votes
1 answer
47 views

Compute efficiently a 1D function relying on a 2D convolution

Let $X = [0,1]$, $h$ the Gaussian function (i.e. $\forall x \in X, h(x) = e^{-\frac{x}{2}}$) and $p \in L^2(X^2)$ I would like to compute numerically the following function : $$ \forall x \in X, \...
user avatar
  • 11
0 votes
0 answers
401 views

How to take convolution of two arrays in Python by using NumPy?

Generally, we know that if we have this relation between Fourier transforms of three functions in frequency domain as: $$\mathfrak{F}\{\mathsf{P}(t)\} = \mathfrak{F}\{\mathsf{Z}(t)\}\mathfrak{F}\{\...
user avatar
3 votes
1 answer
200 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 ...
user avatar
1 vote
2 answers
470 views

Convolution in Python

I have an integral of a convolution between two functions. How can I calculate this in Python? It is a continuum convolution.
user avatar
4 votes
1 answer
176 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-...
user avatar
5 votes
0 answers
99 views

Levinson Recursion for Non Square Toeplitz Matrices

Given a rectangular Toeplitz Matrix $ H $, how could one solve: $$ y = H x $$ For instance, $ H $ can be Linear Convolution Matrix of the filter $ h $: $$ H = \begin{bmatrix} {h}_{1} & 0 & ...
user avatar
  • 298
2 votes
0 answers
37 views

Computing convolution of two characteristic function over a 1D Cartesian mesh

I am trying to compute the convolution of two characteristic functions over a Cartesian mesh. First, I define my Cartesian mesh of the interval $[0,1]$ as follows $$ x_{i} = i \Delta x, i = 0, 1, 2\...
user avatar
1 vote
0 answers
43 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 ...
user avatar
1 vote
1 answer
52 views

Accelerating Conjugate Gradients fitting for small localized kernel (like cubic B-spline)

Question: Is there some pre-conditioner for Conjugate-Gradient (CG) cheap enough, that it is worth using even if my operator is very local (i.e. already has a low number of non-zero elements), as it ...
user avatar
3 votes
1 answer
172 views

Calculating the Convolution Using DFT (FFT)

I have the following convolution as part of a numerical simulation. $$T(r)=\int \mathrm{d}^3r_2\, p(r_2)f(r_2)\alpha(r-r_2)\, .$$ My problem is that the analytical expressions for $f$ and $p$ do ...
user avatar
  • 131