Background#
Spin Weighted Spherical Harmonics#
Spin weighted spherical harmonics are a generalization of spherical harmonics whose \(\theta\) component satisfies the differential equation shown below. The full spin weighted spherical harmonic, which includes \(\phi\) dependence, is given by \({}_s Y_{lm}(\theta) e^{im\phi}\).
Here, \(\theta\) is the polar angle, \(\phi\) is the azimuthal angle, \(s\) is the spin weight and \(l\) and \(m\) are the degree and order of the spin weighted spherical harmonic respectively. The spherical eigenvalue \({}_s \lambda_{lm}\) is given by
Spin weighted spherical harmonics are defined for any integer or half-integer spin weight. For a given spin weight \(s\), the values of \(l\) and \(m\) must satisfy the following conditions.
When the spin weight is 0, spin weighted spherical harmonics simplify to ordinary spherical harmonics. By convention, spin weighted spherical harmonics are normalized so that they satisfy the following orthogonality condition.
spheroidal computes spin weighted spherical harmonics using the following formula from (Goldberg et. al, 1967)
Spin Weighted Spheroidal Harmonics#
Spin weighted spheroidal harmonics are a generalization of spin weighed spherical harmonics. They are defined as solutions to the angular Teukolsky equation, which is obtained from the Teukolsky master equation via separation of variables in the frequency domain. The \(\theta\) dependent portion of this equation is shown below. As with spin weighted spherical harmonics, the full spin weighted spheroidal harmonic is given by \({}_s S_{lm}^\gamma(\theta) e^{im\phi}\).
Here, \(\gamma\) is a complex value representing the spheroidicity and \({}_s A_{lm}\) is the separation constant of the Teukolsky master equation. It is important to note that there are several different conventions used in the literature to define the spheroidal eigenvalue, which in this library is denoted by \({}_s \lambda_{lm}\). The definition used by this library is related to the separation constant that appears above by the following equation.
As \(\gamma \rightarrow 0\), this simplifies to the spherical case in equation (1) and the separation constant \({}_s A_{lm}\) becomes \(l(l+1)-s(s+1)\). Spin weighted spheroidal harmonics obey the same orthogonality condition as spin weighted spherical harmonics.
Spherical Expansion Method#
One method of computing spin weighted spheroidal harmonics is to expand them in terms of spin weighted spherical harmonics as described in Appendix A of (Hughes, 2000).
Here, \(l_{\text{min}} = \text{max}(|s|,|m|)\). The coefficients \(b_j\) are called spherical spheroidal mixing coefficients. Substituting equation (8) into equation (6) and simplifying using equation (1) yields
To simplify the notation, the spin weighted spherical harmonics \({}_s Y_{jm}(\theta)\) have been rewritten in Dirac notation as the kets \(|sjm\rangle\). Multiplying both sides of this equation by \(\langle slm|\) turns this into a matrix equation. The resulting inner products can be simplified using the orthogonality condition in equation (3) and the identities below.
Further simplification is achieved using the fact that all of the Clebsch-Gordan coefficients above vanish when \(|j-l|>2\). The final result is the eigenvalue equation \(\mathbb{K}b = {}_s A_{lm} b\) where \(b\) is the vector of mixing coefficients and \(\mathbb{K}\) is a pentadiagonal matrix with the following entries.
In this equation, the index variable \(l\) is defined as \(l = i+\text{max}(|s|,|m|) - 1\). spheroidal provides the spectral_matrix_bands() function for computing the diagonal bands of this matrix and the spectral_matrix_complex() function for computing the full matrix. Note that this matrix is always symmetric but not hermitian if \(\gamma\) is complex.
import spheroidal
%precision 3
s, l, m, g = -2, 2, 2, 1.5
spheroidal.spectral_matrix_bands(s,m,g, num_terms=5)
array([[-1.179, 7.25 , 15.988, 26.312, 38.484],
[-2.324, -2.721, -2.849, -2.905, -2.935],
[-0.24 , -0.359, -0.424, -0.462, -0.486]])
%precision 3
spheroidal.spectral_matrix_complex(s,m,g, order=5)
array([[-1.179+0.j, -2.324+0.j, -0.24 +0.j, 0. +0.j, 0. +0.j],
[-2.324+0.j, 7.25 +0.j, -2.721+0.j, -0.359+0.j, 0. +0.j],
[-0.24 +0.j, -2.721+0.j, 15.988+0.j, -2.849+0.j, -0.424+0.j],
[ 0. +0.j, -0.359+0.j, -2.849+0.j, 26.312+0.j, -2.905+0.j],
[ 0. +0.j, 0. +0.j, -0.424+0.j, -2.905+0.j, 38.484+0.j]])
The separation constants \({}_s A_{lm}\) (i.e. eigenvalues of \(\mathbb{K}\)) can be computed using the separation_constants() function.
spheroidal.separation_constants(s,m,g, num_terms=5)
array([-1.828, 7.039, 16.049, 26.451, 39.144])
The mixing coefficients \(b_j\) can be computed using the mixing_coefficients() function.
spheroidal.mixing_coefficients(s,l,m,g, num_terms=5)
array([0.963, 0.263, 0.055, 0.009, 0.001])
Leaver’s Method#
An alternative way of computing spin weighted spheroidal harmonics is using the method described in (Leaver, 1985). This method begins by defining \(k_1=\frac{1}{2}|m-s| \text { and } k_2=\frac{1}{2}|m+s|\) which are used to construct the recurrence coefficients below.
The separation constants \({}_s A_{lm}\) are then given by the roots of the following continued fraction.
The continued_fraction() and continued_fraction_deriv() functions are used to compute this continued fraction and its derivative. The roots can then be found with Newton’s method, using an initial guess from the spherical expansion method.
import numpy as np
import matplotlib.pyplot as plt
A = np.linspace(-5,20,100)
plt.plot(A, [spheroidal.continued_fraction(a, s, l, m, g) for a in A])
plt.plot(A, [spheroidal.continued_fraction_deriv(a, s, l, m, g) for a in A])
plt.show()
The spin weighted spheroidal harmonics themselves are constructed using a Frobenius expansion.
Here, \(u = \cos{\theta}\) and the coefficients \(a_n\) are generated by the following set of recurrence relations.
spheroidal generates these coefficients starting from \(a_0 = 1\) and then normalizes the entire array of coefficients so that the spheroidal harmonic satisfies the orthogonality condition in equation (3). The complex phase of the coefficients is determined by enforcing continuity with the spin weighted spherical harmonics as \(\gamma \rightarrow 0\). The leaver_coefficients() function returns this normalized array of coefficients.
spheroidal.leaver_coefficients(-2,2,2,1.5, num_terms=10)
array([ 2.815e-01+0.j, -1.526e-01+0.j, 6.967e-02+0.j, -2.748e-02+0.j,
9.550e-03+0.j, -2.966e-03+0.j, 8.334e-04+0.j, -2.137e-04+0.j,
5.043e-05+0.j, -1.102e-05+0.j])