Skip to content

ariaradick/SphericalHaarTransform.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SphericalHaarTransform

Build Status

Transform a function to a spherical Haar wavelet and spherical harmonic basis where each coefficient is given by

$$ f_{n \ell m} = \int d^3 u f(\vec{u}) h_n(u/u_{\textrm{max}}) Y_{\ell m}(\hat{u}) $$

This package uses FastSphericalHarmonics.jl to compute the spherical harmonic transform and inverse.

One can transform a function by calling

Fp = sph_haar_transform(f, nmax, ellmax, umax; method=:twopt)

where f = f([r,θ,φ]) is the function to transform, nmax = 2^L-1 where L is the number of generations in the Haar transform, ellmax is the maximum ell for the spherical harmonic transform, and umax is the maximum value of u to consider (since the Haar transform is on a closed interval). To perform the inverse,

F = sph_haar_inverse(Fp)

One can also precompute the function on a grid,

us, θs, φs = sph_haar_points(nmax,ellmax,umax)
F = evaluate_f(f, us, θs, φs)
Fp = sph_haar_transform(F)

To access a specific (n,ell,m) coefficient use

Fp[sph_haar_index(n,ell,m)]

About

Transform a 3D function into a spherical Haar wavelet and spherical harmonic basis.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages