But the spherical harmonics depends on the parameterization by theta and phi angles. It is important to check that the first non trivial spherical harmonic (n=1, m=0) is approximately aligned with the mapping of the first non-trivial eigenfunction on the mesh. If not, we need to apply a rotation.
Steven and Maxime We can use formula provided by scipy https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.sph_harm.html
But the spherical harmonics depends on the parameterization by theta and phi angles. It is important to check that the first non trivial spherical harmonic (n=1, m=0) is approximately aligned with the mapping of the first non-trivial eigenfunction on the mesh. If not, we need to apply a rotation.