I have encountered the following problem regarding the reconstruction of a particle density function $f$. It is possible to acquire "measurements" of the particle density function $f : [0,1]^2 \rightarrow \mathbb{R}^{>0} $. The discrete measurements $m_{i}=\int_{[0,1]^2}f(x) g_{i}(x)dx$ are given by a weighted integral of $f$ with the weighting functions $g_{i}$. The functions $g_{i}$ are known in advance and the task is to reconstruct $f$ numerically given the measurements $m_{i}$.

Unfortunately I cannot give much information about the weighting functions $g_{i}$. They are the output of a computer simulation and I have them sampled on a grid spanning the domain of $f$ (e.g. $[0,1]^2$). Generally speaking, the functions $g_{i}$ look a bit like the picture below where the red color corresponds to $g_{i}(x,y)=0$ and the blue/greenish color corresponds to $g_{i}(x,y)=1$ (please ignore the dark outlines):

Other sampling function are similar to rotated versions of $g_{i}$.

I am wondering if there is a general numerical approach to tackling this kind of problem?

Sampling function $g_{i}$. Red zones correspond to $g_{i}=0$.

  • $\begingroup$ basically this is an underdetermined linear set of equations and can be solved using the pseudo inverse. $\endgroup$
    – user619894
    Aug 11, 2021 at 21:18

1 Answer 1


The function $f(x, y)$ can be expressed as a linear combinations of the weighting functions:

$f(x, y) = \displaystyle \sum_j f_j g_j(x, y) $


$m_i = \displaystyle \int f(x,y) g_i(x,y) = \sum_j f_j \int g_j(x,y) g_i(x,y) $

Define the square matrix $G = [ G_{ij} ]$, and $G_{ij} = \displaystyle \int g_i(x,y) g_j(x,y) $

Then we have the matrix equation

$ G \mathbf{f} = \mathbf{m} $

Hence, the vector $ \mathbf{f} = G^{-1} \mathbf{m} $

Now we can reconstruct $f(x, y)$ from the vector $\mathbf{f}$ and $\{ g_i(x,y) \}$.

  • $\begingroup$ Notice that the problem is underdetermined: $f$ can be expanded into an infinite sum of basis functions. A judgment based on some domain specific assumptions must be done to decide what the "best" truncation is. $\endgroup$
    – user619894
    Aug 12, 2021 at 6:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.