Spin-weighted spherical harmonics

Author: Tangchao Liu
Date: September 16, 2025
Email: tangchaoliu4@gmail.com

This notebook codes the spin-weighted spherical harmonics presented in J. Math. Phys. 8, 2155–2161 (1967) (referred to as Goldberg et al (1967) henceforth in this notebook). This code only works for integer spin .

Main codes

Spin raising and lowering operators

Eq.(2.3) of Goldberg et al (1967)

(*Spin raising operator*)
edth[s_,η_,θ_,φ_]:=-((Sin[θ])^s)*( D[((Sin[θ])^(-s)) η,θ] +I Csc[θ]D[((Sin[θ])^(-s)) η,φ]);
(*Spin lowering operator*)
edthBar[s_,η_,θ_,φ_]:=-((Sin[θ])^(-s))*( D[((Sin[θ])^s) η,θ] -I Csc[θ]D[((Sin[θ])^s) η,φ]);

Verify the equation after (2.3a) of Goldberg et al (1967).

edthBar[s+1,edth[s,η[θ,φ],θ,φ],θ,φ]-edth[s-1,edthBar[s,η[θ,φ],θ,φ],θ,φ]//FullSimplify

Other checks for the spin raising and lowring operators:
(1) , the Laplace operator restricted on the two-sphere 
(2) , the spin-weight  generalization of  such that it has  as eigenfunctions with eigen values .

(*Check (1)*)
edth[-1,edthBar[0,f[θ,φ],θ,φ],θ,φ]//Simplify
(*Check (2)*)
edthBar[s+1,edth[s,f[θ,φ],θ,φ],θ,φ]//Simplify

Spin-weighted spherical harmonics

From (2.5) of Goldberg el al (1967)

SwSphHarm[s_,l_,m_,θ_,φ_]:=Module[{Tspin,Pspin,result}(*Target spin and spin provisoire, provisoire meaning temparory*),

(*Parameters don't fit with definition*)
If[l<0||Abs[m]>l||Abs[s]>l,Print["The parameters do not make this function well-defined."];
Return[$Failed]];

Which[
(*s=0, usual spherical harmonics*)
s==0,SphericalHarmonicY[l,m,θ,φ],

(*positive spin weight*)
0<s<=l,(
Pspin=0;
Tspin=s;(*The number of steps*)
result=SphericalHarmonicY[l,m,θ,φ];
While[Pspin<Tspin,
result=edth[Pspin,result,θ,φ];
Pspin++;
];
Sqrt[(((l-s)!)/((l+s)!))]*result//Simplify
),

(*Negative spin weight*)
-l<=s<0,(
Pspin=0;
Tspin=-s;(*The number of steps*)
result=SphericalHarmonicY[l,m,θ,φ];
While[Abs[Pspin]<Tspin,
result=edthBar[Pspin,result,θ,φ];
Pspin--;
];
Sqrt[(((l+s)!)/((l-s)!))]*(((-1))^s)*result//Simplify
)]
];

Explicit examples

A few examples that will fail

SwSphHarm[0,-1,1,θ,φ]
SwSphHarm[0,1,2,θ,φ]
SwSphHarm[2,1,1,θ,φ]

Agreement with ordinary spherical harmonics when  by an example

SwSphHarm[0,2,1,θ,φ]
SphericalHarmonicY[2,1,θ,φ]

Spin-weight . Agreement with wikipedia page of “spin-weighted spherical harmonics” https://en.wikipedia.org/wiki/Spin-weighted_spherical_harmonics#Spin-weight_s_=_1,_degree_l_=_1 is checked.

SwSphHarm[1,1,0,θ,φ]
SwSphHarm[1,1,1,θ,φ]
SwSphHarm[1,1,-1,θ,φ]

Checks

This section provides a few checks of the results given by Main Codes.

First, set global assumptions about the angular coordinates.

$Assumptions=And[
0<θ<π,
0<=φ<2π
];

Non-exhausting checks of orthonormality

The spin-weighted spherical harmonics should satisfy
.
This subsection checks this for  and  for the first few  and .

(1) , a few different ’s

Table[Integrate[Conjugate[SwSphHarm[1,l,0,θ,ϕ]]*SwSphHarm[1,lp,0,θ,ϕ]*Sin[θ],{θ,0,Pi},{ϕ,0,2 Pi}],{l,1,6},{lp,1,6}]//MatrixForm

(2) , different ’s for a few  values

l=1;
While[l<=4,
Print[
Table[Integrate[Conjugate[SwSphHarm[1,l,m,θ,ϕ]]*SwSphHarm[1,l,mp,θ,ϕ]*Sin[θ],{θ,0,Pi},{ϕ,0,2 Pi}],{m,-l,l},{mp,-l,l}]//MatrixForm,"  l=",l
];
l++;
]
Clear[l]

(3) , a few different ’s

Table[Integrate[Conjugate[SwSphHarm[-2,l,0,θ,ϕ]]*SwSphHarm[-2,lp,0,θ,ϕ]*Sin[θ],{θ,0,Pi},{ϕ,0,2 Pi}],{l,2,7},{lp,2,7}]//MatrixForm

(4) , different ’s for a few  values

l=2;
While[l<=5,
Print[
Table[Integrate[Conjugate[SwSphHarm[-2,l,m,θ,ϕ]]*SwSphHarm[-2,l,mp,θ,ϕ]*Sin[θ],{θ,0,Pi},{ϕ,0,2 Pi}],{m,-l,l},{mp,-l,l}]//MatrixForm,"  l=",l
];
l++;
]
Clear[l]

Verification of a few properties

(1) There’s a typo in (2.6) of Goldberg et al (1967). The correct equation should be . Verify it for a few  and a few :

For[l=1,l<=5,l++,
For[s=1,s<=l,s++,
For[m=-l,m<=l,m++,Print[Simplify@Conjugate[SwSphHarm[s,l,m,θ,φ]]-(((-1))^(m+s))SwSphHarm[-s,l,-m,θ,φ]//Simplify]]
]
]

The code returns null results for this non-exhausting check as expected.

(2) Check  for a few .

For[l=1,l<=5,l++,
For[s=-l,s<=l,s++,
For[m=-l,m<=l,m++,
Print[edthBar[s+1,edth[s,SwSphHarm[s,l,m,θ,φ],θ,φ],θ,φ]+(l-s)*(l+s+1)*SwSphHarm[s,l,m,θ,φ]//Simplify]
]
]
]

The code returns null results for this non-exhausting check as expected.