For multiple points on the sphere what's the best way to get a matrix where the columns are the points and the rows are the spherical harmonic modes for each of the points?
I did this but it does not work if only one point is passed in.
function Y(N::Integer, θ, ϕ)
n, m = acnorder(N)
Yres = computeYlm.(θ, ϕ, lmax = N, SHType = SphericalHarmonics.RealHarmonics())
Ymat = reduce(hcat, Yres)
# remove the Condon-Shortley phase
condon = (-1).^m
condon .* Ymat
end
For multiple points on the sphere what's the best way to get a matrix where the columns are the points and the rows are the spherical harmonic modes for each of the points?
I did this but it does not work if only one point is passed in.