Skip to content

Fast and exact spin spherical harmonic transforms

License

Notifications You must be signed in to change notification settings

eschnett/SSHT.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SSHT.jl: Fast and exact spin-weighted spherical harmonic transforms

This package is a Julia wrapper for the SSHT library. It calculates spin-weighted spherical harmonic transforms.

  • Documenter
  • GitHub CI
  • Codecov

Example

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)

s=_1, l=1, m=+1 mode

Related packages

About

Fast and exact spin spherical harmonic transforms

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages