ζ and γ represent choices for the spin gauge.  γ is defined by the choice of complex vector m, where 
  \(TraditionalForm\`m ≡ \(e\^iγ\/\@2\) \((\(θ\&^\) + i\ \(ϕ\&^\))\)\),
with \(TraditionalForm\`\(θ\&^\)\) and \(TraditionalForm\`\(ϕ\&^\)\) being the usual unit basis vectors in spherical coordinates.  Ideally, the choice made in this definition would also fix the choice of ζ, as ζ=γ.  Unfortunately, this is not always the chosen convention, and ζ is simply chosen as the parameter which makes the definition below correct.

By default, these parameters are kept unspecified by the entry below.  The "classic" (though not universal) convention is to choose ζ=γ=0.  [Note that γ is not used in this notebook.]

ζ =. ;
γ =. ;

Do This First!!!

These are just a few useful commands to Mathematica.

Off[General::"spell1"]
\(\($PreRead = \((# /. {"I" -> "MyVariableI", "C" -> "MyVariableC"})\) &;\)\)
MakeBoxes[MyVariableI, 
        form : (StandardForm | 
              TraditionalForm)] := "I"
MakeBoxes[MyVariableC, 
        form : (StandardForm | 
              TraditionalForm)] := "C"
<< Graphics`MultipleListPlot`

Spin-Weighted Spherical Harmonics Calculator

Function Definition

Y[s_, l_, 
          m_, θ_, ϕ_] := (E^(I s ζ)) (((-1))^m) 
          Simplify[(Sqrt[(((l + m)! (l - m)! (2  l + 
                            1))/((l + s)! (l - s)! 
                        4  π))]) (((Sin[(θ/2)]))^(2  
                    l)) (∑_(r = 0)^(l - s))(Binomial[l - s, r] 
                    Binomial[l + s, 
                      r + s - 
                        m] (((-1))^(l - r - 
                          s)) (E^(I m ϕ)) (((Cot[(θ/2)]))^(2  r + s - m))), 
            Assumptions -> {ϕ ∈ Reals, θ ∈ 
                  Reals}];

Tests (s=0,1,2;  l=0,...,4;  m=-l,...,l;  Arbitrary ζ;  \(TraditionalForm\`\(\_\(-s\)\) 
          Y\_\(l, m\) = \(\(\((\(-1\))\)\^\(m + s\)\)\_s\) 
          Y\&_\_\(l, \(-m\)\)\);  ϕ→ϕ+π)

s=0

These should all be zero.

Table[
        FullSimplify[
          Y[0, l, m, θ, ϕ] - 
            SphericalHarmonicY[l, m, θ, ϕ], 
          Assumptions -> {ϕ ∈ Reals, θ ∈ 
                Reals}], {l, 0, 3}, {m, -l, l}] // MatrixForm

s=1

This is a sampling of the first few functions of spin weight s=1.

Table[
        FullSimplify[Y[1, l, m, θ, ϕ], 
          Assumptions -> {ϕ ∈ Reals, θ ∈ 
                Reals}], {l, 1, 3}, {m, -l, l}] // MatrixForm

These should all be zero.

ζInitial = ζ; ζ =. ;
Table[
        FullSimplify[
          Y[1, l, m, θ, ϕ] - (-(E^(I ζ)) (Sqrt[(((l - 1)!)/((l + 
                              1)!))]) ((∂_θ) 
                        SphericalHarmonicY[l, 
                        m, θ, ϕ] + I Csc[θ] (∂_ϕ) SphericalHarmonicY[l, m, θ, ϕ])), 
          Assumptions -> {ϕ ∈ Reals, θ ∈ 
                Reals}], {l, 1, 4}, {m, -l, l}] // 
      MatrixForm

    
ζ = ζInitial;

s=2

This is a sampling of the first few functions of spin weight s=2.

Table[
        FullSimplify[Y[2, l, m, θ, ϕ], 
          Assumptions -> {ϕ ∈ Reals, θ ∈ 
                Reals}], {l, 1, 3}, {m, -l, l}] // MatrixForm

These should all be zero.

ζInitial = ζ; ζ =. ; 
    Table[FullSimplify[
          Y[2, l, m, θ, ϕ] - (-(E^(I ζ)) (Sqrt[(((l - 2)!)/((l + 
                              2)!))]) (Sqrt[(((l + 1)!)/((l - 
                              1)!))]) 
                Sin[θ] ((∂_θ)((1/Sin)[θ] 
                          Y[1, l, 
                            m, θ, ϕ]) + I Csc[θ] (∂_ϕ)((1/Sin)[θ] 
                            Y[1, l, m, θ, ϕ]))), 
          Assumptions -> {ϕ ∈ Reals, θ ∈ 
                Reals}], {l, 2, 4}, {m, -l, l}] // 
      MatrixForm
ζ = ζInitial;

s→-s

These should all be zero.

ζInitial = ζ; ζ =. ;
For[s = 0, s ≤ 2, 
      s = s + 1, 
Print["s = ", s, "  ", 
        Table[FullSimplify[
              Y[-s, l, m, θ, ϕ] - (((-1))^(m + s)) 
                  Y[s, l, -m, θ, ϕ]\[Conjugate] , 
              Assumptions -> {ϕ ∈ 
                    Reals, θ ∈ Reals, ζ ∈ 
                    Reals}], {l, s, 4}, {m, -l, l}] // 
          MatrixForm]
]
s =. ;
ζ = ζInitial;

ϕ→ϕ+π

These should all be zero.

ζInitial = ζ; ζ =. ;
Table[
        FullSimplify[
          Y[s, l, m, θ, ϕ + π] - ((((-1))^m) 
                Y[s, l, m, θ, ϕ]), 
          Assumptions -> {ϕ ∈ Reals, θ ∈ 
                Reals, ζ ∈ Reals}], {s, -4, 4}, {l, 
          Abs[s], Abs[s] + 3}, {m, -l, l}] // 
      MatrixForm
ζ = ζInitial;