2D discrete Fourier transform for irregular surface in 3D I would like to know if there is a way to compute the 2D discrete Fourier transform from samples collected from a grid of electrodes placed on a (non spherical) surface. The grid is not rectangular/uniform. The surface is actually the head scalp.
Many thanks,
Cesare
 A: I suppose the question here is what a "discrete Fourier transform" means on an arbitrary non-flat grid.
One natural approach is to think of the discrete Fourier transform as the expansion of a function in the basis of Laplacian eigenfunctions,
$$f(x,y) = \sum_{i} \alpha_i b_i(x,y)$$
where the $\Delta b_i = \lambda_i b_i$, where in the case of a rectangular region of the plane we get that the $b_i$ are the usual sines and cosines.
This idea can be generalized to your grid. Suppose $p_{i,j}$ are the positions of a quadrilateral grid of points in space defining your surface, organized into $R$ rows $i$ and $C$ columns $j$. We can write down a linear operator $L:\mathbb{R}^{RC} \to \mathbb{R}^{RC}$ which discretizes the Laplace-Beltrami operator on your surface. Some care needs to be taken to (1) correctly account for the fact that the grid points are not evenly spaced, and the grid cells not necessarily planar, and (2) correctly account for the boundary conditions.(*) This paper for example can get your started on how to do this: https://www.sciencedirect.com/science/article/pii/S0898122107005731
Then take $L$, find its eigenvectors (by computing its singular value decomposition, say), and expand your signal in the eigenvector basis.
(*): Dirichlet boundary conditions give you "sines" and Neumann conditions give you the "cosines."
