Domain

This package deals with standard spherical harmonics, spin-weighted spherical harmonics, and Wigner's ๐”‡ matrices. The key question is what domains these functions are defined on โ€” that is, what type of arguments they take. Here, I argue that it's best to use quaternions for all three. The rest of this package and documentation use the language of quaternions, though we will make contact with the more traditional parameterizations in terms of spherical coordinates and Euler angles as needed.

Three functions on two domains

Usually, these are written as functions of spherical coordinates for both types of harmonics, and Euler angles for the ๐”‡ matrices:

\[\begin{gathered} Y_{โ„“,m}(ฮธ, ฯ•), \\ {}_sY_{โ„“,m}(ฮธ, ฯ•), \\ ๐”‡^{(โ„“)}_{m', m}(ฮฑ, ฮฒ, ฮณ). \end{gathered}\]

While that's good enough for many purposes, it obscures the true nature of these functions, and makes certain manipulations more difficult or even impossible. We can make a few observations:

  1. Standard (scalar) spherical harmonics are just a special case of spin-weighted spherical harmonics with spin weight $s=0$.
  2. Spin-weighted spherical harmonics cannot be defined as functions on the sphere $๐•Šยฒ$ alone; they depend on an additional choice of frame at each point on the sphere โ€” a choice of basis for the tangent space at that point. This extra structure is necessary to define what "spin weight" means at all. (We'll define it soon.)
  3. Euler angles are a bad way to deal with rotations. Besides the coordinate singularities at the poles, they make composing rotations far more difficult. More importantly, they make it hard to deal with generators of rotations, which are crucial for angular-momentum operators.

The second point especially requires a little more explanation. In fact, I wrote an entire paper that gets very deep into the details about this point [1]. It may seem odd that spin-weighted spherical functions cannot be defined on the sphere $๐•Šยฒ$, when they're written in terms of spherical coordinates. The crucial subtlety here is that the spherical coordinates $(ฮธ, ฯ•)$ implicitly define a conventional choice of tangent basis. But spin weight is defined in terms of what happens to a function when you rotate that tangent basis. Thus, if we start from spherical coordinates, we are naturally led to introduce a third angle $ฯˆ$ describing rotation of the tangent basis about the radial direction. And those three angles together are just Euler angles. In fact, $(ฮธ, ฯ•, ฯˆ)$ is precisely the set of "Eulerian" angles defined by the very influential book by Whittaker [2]. It turns out [3] that with this extra angle included explicitly, the original spin-weighted spherical harmonics [4] are simply proportional to Wigner's ๐”‡ matrices,

\[{}_{s}Y_{โ„“,m}(ฮธ, ฯ•, ฯˆ) = (-1)^s \sqrt{\frac{2โ„“+1}{4ฯ€}} \, \overline{๐”‡^{(โ„“)}_{m, -s}(ฯ•, ฮธ, ฯˆ)},\]

where $(ฯ•, ฮธ, ฯˆ)$ are read as the Euler angles $(ฮฑ, ฮฒ, ฮณ)$. So we might as well think of them as being parameterized in the same way.

The conjugate

The complex conjugate here is essential. The sources cited above โ€” and versions of this package before 3.0 โ€” use a $๐”‡$ that is the complex conjugate of the one settled on here, which is why the same relation appears in them without the bar. See the conventions summary for the settled definition, and the comparisons for how each source relates to it.

The geometric picture

It might be helpful to pause for a moment and consider a more intuitive physical picture. Consider a telescope. We can point it any which way we want, which corresponds to choosing a point on the sphere $๐•Šยฒ$. Now, imagine an ideal pixel at the very center of the image formed by that telescope. The entire sky can be described in terms of that pixel as a function of where the telescope is pointed. That is, it's a function of $๐•Šยฒ$. But now, suppose we put a polarizer on the telescope. The pixel's value will now depend not only on where the telescope is pointed, but also on the orientation of the polarizer about the optical axis. This extra degree of freedom is exactly the extra angle $ฯˆ$ we mentioned above.

But really, what we're doing is rotating our telescope in three-dimensional space, so the pixel's value is a function on the rotation group $\mathrm{SO}(3)$, not just the sphere $๐•Šยฒ$. Now, with light, we know every possible polarized value once we measure the value with one polarization and the value with the orthogonal polarization, which are combined into a single complex number. (Compare Jones vectors.) As we rotate our choice of the first polarization by an angle $ฯˆ$, the complex combination varies as $e^{iฯˆ}$. This is exactly what it means to have spin weight $s=1$ โ€” which is, not coincidentally, the spin of a photon.

Imagining that we had a polarizing telescope measuring some other kind of field with spin $s$, the complex combination would vary as $e^{isฯˆ}$. Here the polarization is rotated in the sense that Newman and Penrose use, which is opposite to the sense of the third Euler angle in the formula above; in terms of that Euler angle, a function of spin weight $s$ varies as $e^{-isฯˆ}$, as the conventions summary states precisely. (This is important for gravitational-wave astronomy, which features fields with spin between -2 and +2, inclusive. In principle, we could use the same framework to consider neutrino telescopes with spin-1/2 polarization.) And since we could have half-integer spins, we actually need to consider not just the rotation group $\mathrm{SO}(3)$ (which is topologically $โ„โ„™ยณ$), but its double cover $\mathrm{Spin}(3) \cong \mathrm{SU}(2)$ (which is topologically $๐•Šยณ$), to fully capture the behavior of general fields.

Unification in $\mathrm{Spin}(3)$

So, at this point, we see that all three of the functions we care about โ€” standard spherical harmonics, spin-weighted spherical harmonics, and Wigner's ๐”‡ matrices โ€” are naturally thought of as functions on $\mathrm{Spin}(3)$. The traditional way to parameterize this would be with (extended) Euler angles. However, as mentioned above, Euler angles are a poor choice for many purposes. First, we have the problem of coordinate singularities at the "poles" (aka "gimbal lock"). This is not a problem if we use quaternions instead. Second, we have the problem of composing rotations; given rotations described by Euler angles $(ฮฑ, ฮฒ, ฮณ)$ and $(ฮฑ', ฮฒ', ฮณ')$, finding another set of angles $(ฮฑ'', ฮฒ'', ฮณ'')$ representing their composition is a nasty, nonlinear problem. With quaternions, composition is just quaternion multiplication: $R'' = R'\, R$. Third, and most importantly, we have the problem of generators of rotations. With Euler angles, infinitesimal rotations are described by complicated derivatives with bizarre trigonometric factors. With quaternions, infinitesimal rotations are described by "pure-vector" quaternions that can be exponentiated almost as simply as imaginary numbers. That is, if $๐ฎ$ is a unit quaternion with 0 scalar part, and $ฮธ$ is a real number, then

\[\exp \left[ ๐ฎ \frac{ฮธ}{2} \right] = \cos \frac{ฮธ}{2} + ๐ฎ \sin \frac{ฮธ}{2}\]

is a unit quaternion representing a rotation by $ฮธ$ about $๐ฎ$. Note the similarity to Euler's formula for complex exponentials. Alternatively, going from a unit quaternion to its generator just uses the logarithm, which is only slightly more complicated than the complex logarithm.

So the conclusion is clear: we should represent the arguments of all these functions as unit quaternions, which is what this package does:

\[\begin{gathered} Y_{โ„“,m}(๐), \\ {}_sY_{โ„“,m}(๐), \\ ๐”‡^{(โ„“)}_{m', m}(๐). \end{gathered}\]

We can still provide convenience methods that convert from spherical coordinates or Euler angles to quaternions, but internally everything is done with quaternions, and the documentation will generally be written in terms of quaternions. See Boyle [1] for full details.

Pushing forward to $๐•Šยฒ$

Assuming the functions have been defined on $\mathrm{Spin}(3)$, we can push them forward to functions on the sphere $๐•Šยฒ$.[1] Given a choice of a special point in $๐•Šยฒ$ โ€” conventionally called the north pole $๐ณ$ โ€” we can map $๐ โˆˆ \mathrm{Spin}(3)$ to $๐•Šยฒ$ simply by using it to rotate $๐ณ$ to $ฯ€(๐) = ๐\, ๐ณ\, ๐โปยน$. For any particular point $๐ง โˆˆ ๐•Šยฒ$, the set of all rotors that map to that point (its preimage) is of the form

\[ฯ€^{-1}(๐ง) = \left\{๐\, e^{๐ค ฮธ/2} \,\middle|\, ฮธ โˆˆ [0, 4ฯ€)\right\},\]

where $๐$ is any particular rotor that maps $๐ณ$ to $๐ง$, and $๐ค$ is the generator of rotations about the $z$ axis. In terms of the telescope analogy presented above, $ฮธ$ represents rotation of the telescope polarizer about the optical axis.

Now, for any function $f(๐)$ on $\mathrm{Spin}(3)$, we can define the pushforward function on $๐•Šยฒ$ by taking a point to the average value of $f$ over the preimage. (Such "integration along the fiber" is a standard concept in differential geometry [5].) By abuse of notation, we will use the same symbol $f$ for this new function, with the understanding that the symbol will be reinterpreted as needed. Thus, for $๐ง โˆˆ ๐•Šยฒ$, we define

\[f(๐ง) = \frac{1}{4ฯ€} \int_0^{4ฯ€} f\left(๐\, e^{๐ค ฮธ/2}\right) \, dฮธ,\]

where $๐$ is any rotor such that $ฯ€(๐) = ๐ง$. The choice of $๐$ does not matter because the integral averages over all possible choices. Also, given the behavior $e^{isฯˆ}$ described above, we know that only fields with $s=0$ will have nonzero values under this operation. Therefore, only functions with spin weight 0 can be pushed forward to nontrivial functions on $๐•Šยฒ$. And again, because the standard scalar spherical harmonics are precisely the spin-weighted spherical harmonics with $s=0$, they can be pushed forward in this way.

This is effectively the only continuous way to push functions forward to all of $๐•Šยฒ$. For functions with nonzero spin-weight, we need a reference direction to specify the tangent basis. However, the hairy-ball theorem tells us this cannot be done continuously over the entire sphere. Originally, the spin-weighted spherical harmonics were not defined on $๐•Šยฒ$, but the spherical coordinates โ€” which are topologically the cylinder $Iร—๐•Šยน$, for which there is no such obstruction.

Pulling back to $Iร—๐•Šยน$

Finally, we can come back to spherical coordinates: the coordinates $(ฮธ, ฯ•)$, with $ฮธ โˆˆ [0, ฯ€]$ and $ฯ• โˆˆ [0, 2ฯ€)$. Note that this range for $ฯ•$ is half open, only because it is parameterizing a circle; $0$ and $2ฯ€$ represent the same point. Thus, we see that the spherical coordinates do not actually parameterize a sphere, but rather a cylinder. Of course, that cylinder is usually mapped onto the sphere, shrinking the top and bottom edges to points which represent the poles of the sphere and therefore the singularities of the spherical coordinates. Nonetheless, a function defined on spherical coordinates is really a function on the cylinder $Iร—๐•Šยน$.

When we write spin-weighted functions in terms of spherical coordinates, we are not only quietly using the "wrong" domain, but also implicitly choosing a tangent basis at each point. Specifically, the $\boldsymbol{ฮธ}$ unit vector points directly down the cylinder, mapping to a vector field that everywhere points toward the south pole on the sphere. This mapping fails to give a unique tangent vector at both poles, of course, which is consistent with the hairy-ball theorem. Still, it gives us a well defined function almost everywhere on the sphere. Interestingly, the function is well defined everywhere on the cylinder. These two considerations โ€” the actual topology and the implicit choice of tangent basis โ€” show that it really is more correct to think of spin-weighted spherical functions written in spherical coordinates as being defined on the cylinder $Iร—๐•Šยน$.

Now, interestingly, once we've picked out a basis, we can actually define the unique rotor

\[๐(ฮธ, ฯ•) = e^{ฯ•๐ค/2}\, e^{ฮธ๐ฃ/2}.\]

Conflating spherical coordinates with geometry of $๐•Šยฒ$ again for a moment, we can think of this mapping as taking the north pole $๐ณ$ to the point on the sphere with coordinates $(ฮธ, ฯ•)$, and the vector $๐ฑ$ onto $\boldsymbol{ฮธ}$ at that point.

The key point is that, in this case, the mapping doesn't start with $\mathrm{Spin}(3)$, but rather ends there. Thus, we can define a pullback of a function $f(๐)$ to a function $f(ฮธ, ฯ•)$ in the usual way โ€” simple composition:

\[f(ฮธ, ฯ•) = f\big(๐(ฮธ, ฯ•)\big).\]

This is defined for all spin weights, because we've chosen a tangent basis at each point. However, if we then try to "wrap" the cylinder back onto the sphere, we cannot define the function at the poles for nonzero spin weights, because the tangent basis is not uniquely defined there. That is, the function value will not be independent of the choice of $ฯ•$ at the poles, so the "wrapping" is not well defined.

Still, this approach does give us the value of the function for any particular point on $๐•Šยฒ$ and a particular choice of tangent direction at that point. Moreover, for a function with a definite spin weight $s$, this is enough information to reconstruct the value of the function for any other choice of tangent direction at that same point. This is how we can quite reasonably write spin-weighted spherical harmonics as functions of spherical coordinates, even though they cannot be defined as functions on the sphere itself. Of course, using the fundamental domain is a much more powerful and flexible approach; among other things, it allows us to define differential operators acting on these functions, which we will do next.

  • 1Okay, technically we'll use more structure than just $๐•Šยฒ$. We're picking out a special point in that space, and assuming the action of $\mathrm{Spin}(3)$ on that point to define the mapping. So really $๐•Šยฒ$ as written above really represents a pointed space of $๐•Šยฒ$ with basepoint $๐ณ$. Elsewhere, I criticize the usual approach because it ignores the fundamental importance of the choice of tangent basis at each point, sweeping it under the rug. This pushforward to $๐•Šยฒ$ also uses some extra structure โ€” perhaps reinforcing the notion that spin-weighted functions really should just be thought of as functions on $\mathrm{Spin}(3)$.