# Reconstruct density function from weighted sums with set of weighting functions

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$$.

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

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)$$

Hence,

$$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) \}$$.

• 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. Aug 12, 2021 at 6:34