This package is a Julia wrapper for the SSHT library. It calculates spin-weighted spherical harmonic transforms.
Plot the s=+1, l=1, m=+1
spin-weighted spherical harmonic function:
using SSHT
lmax = 40
L = lmax + 1
nphi = SSHT.sampling_dh_nphi(L)
ntheta = SSHT.sampling_dh_ntheta(L)
phis = [SSHT.sampling_dh_p2phi(p, L) for p in 1:nphi];
thetas = [SSHT.sampling_dh_t2theta(t, L) for t in 1:ntheta];
flm = zeros(Complex{Float64}, L^2);
flm[SSHT.sampling_elm2ind(1, +1)] = 1;
f = SSHT.core_dh_inverse_sov(flm, L, +1);
################################################################################
using GLMakie
fig = Figure(; resolution=(1000, 300));
Axis(fig[1, 1]; title="real(f)")
Axis(fig[1, 3]; title="imag(f)")
hm = heatmap!(fig[1, 1], phis, thetas, real.(f); colormap=:magma)
Colorbar(fig[1, 2], hm)
hm = heatmap!(fig[1, 3], phis, thetas, imag.(f); colormap=:magma)
Colorbar(fig[1, 4], hm)
rowsize!(fig.layout, 1, Aspect(1, 1 / 2))
display(fig)