Let's suppose I have a number of data points on the surface of a sphere. These data points lie randomly scattered on the sphere surface, i.e. they aren't distributed on a regular grid such as a Gaussian grid.
My question is: Is there a Python library available that allows me to compute the spherical harmonic transform of this data set? Otherwise, I first have to interpolate the data points onto a regular grid by myself before applying a standard spherical harmonic transform.
For non-uniform Fourier transforms I found several options, e.g. this one. However, for non-uniform spherical harmonic transforms (which are of course related to Fourier transforms) I found none so far.
I see this is an old question, but I'll post this anyway.
One of the best libaries available for spherical harmonics in python or Fortran is shtools. Specifically, check out the function SHExpandLSQ, which uses a least-squares method to find the spherical harmonic expansion coefficients on an irregularly sampled grid.