I have a set of solutions to an equation, which are all very similar to spherical harmonics. The solutions are discretised on a regular 3d grid. I would like to label them with which spherical harmonic they are most like, so the $l$ and $m$ values for each one.
Theoretically this is just selecting the largest coefficient from a decomposition of each solution vector onto the spherical harmonic space, or a transform of some kind.
Is there a cheap/simple way to calculate which harmonic each solution is nearest?