I am looking for a package that can calculate the spherical harmonic function, and I expect it to be able to directly give the value of the spherical harmonic function Y_{l,m}(\theta,\phi) , when given input l, m ,\theta , \phi .

does FastSphericalHarmonics.jl do what you want?
Sure its star count is 9 >> 0 for a specialty package. note the version – it is stable.
The author is respected. I do not know about the other pkg.

Yeah, the number of stars is not a particularly reliable indicator. My heuristics : are there automatic tests, is there a commit in the last N months, is there any important PR unmerged, is there any scary issue without comment from the maintainers, have the committers authored other julia packages.

SphericalHarmonics.jl should give you what you want. I’m the person maintaining it, but I haven’t had time to get around to it recently. Nevertheless, it should give you what you want, although the API would change with the next breaking release. It should be performant as well.

In any case, the way to go from real to complex harmonics is to compute something like Complex(Ylm(l,m), Ylm(l,-m))/sqrt(2) for m > 0, and Ylm(l,m) for m==0.

This is a nice idea, but I was curious that FastTransforms.jl could compute the real Orthonormal Harmonic, but there is no interface for complex spherical harmonics.

Yes, it can give me what I want, but I don’t know if it’s reliable

I think they have special algorithms that compute spherical harmonic transforms for real harmonics, so they also have a function to compute these harmonics. It can definitely be extended to complex harmonics, and this would be quite convenient. I guess no one has done it yet.