Tools for working with spherical harmonics