Differential operators
Each of the functions below returns the matrix of an angular-momentum operator acting on mode weights in the canonical ordering described on the Utilities page, for a given spin weight and range of $ℓ$; applied to a ModeWeights instead, the same function returns a new ModeWeights, with its spin weight adjusted where the operator changes it. The indices may be integers or half-integers, the latter given as Rational{Int}s with denominator 2 or as HalfOddIntegers, but all of the indices in one call must be of one kind, as described on the half-integer page. See the background page for discussion, including the explanation for why there cannot be Rx or Ry operators.
Applied to mode weights, as ð * w or ð(w), an operator builds no matrix, and its result has the same range of $ℓ$ as its input, even where the spin weight changes; ModeWeights(w; ℓₘᵢₙ, ℓₘₐₓ) copies a result into another range. A product of several operators is applied from right to left, so that ð̄ * ð * w is ð̄ * (ð * w), which needs no matrix either. mul!(w′, ð, w) writes the result into a destination that already has the labels of the result, and allocates nothing. The matrix form, ð(s, ℓₘᵢₙ, ℓₘₐₓ), has no labels to check against those of the weights, so it acts on the plain vector array_view(w) rather than on the ModeWeights itself, whose product with a plain matrix is refused.
Where the name of an operator is not ASCII, it has an ASCII alias, public but not exported: L2 for L², Lplus and Lminus for L₊ and L₋, R2, Rplus and Rminus for R², R₊ and R₋, and eth and ethbar for ð and ð̄. Δspin, the change in spin weight that an operator makes, is also spelled Deltaspin.
Docstrings
SphericalFunctions.Lx — Constant
Lx(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
Lx(s, ℓₘₐₓ, [T=Float64])
Lx * wCompute the $x$ component of the left angular-momentum operator, $L_x = (L_+ + L_-)/2$.
This is the standard $L_x$ operator, familiar from basic physics, extended to work with SWSHs. See the conventions summary or Boyle for more details. The matrix is real, symmetric and tridiagonal.
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
Note that there are no corresponding Rx and Ry functions. The right raising and lowering operators change the spin weight, so $R_x = (R_+ + R_-)/2$ would map a function of spin weight $s$ to a sum of a function of spin weight $s+1$ and one of spin weight $s-1$. That is not a linear map on the mode weights of a single spin weight, and so it cannot be represented by a matrix of the kind these functions return.
SphericalFunctions.Ly — Constant
Ly(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
Ly(s, ℓₘₐₓ, [T=Float64])
Ly * wCompute the $y$ component of the left angular-momentum operator, $L_y = (L_+ - L_-)/(2i)$.
This is the standard $L_y$ operator, familiar from basic physics, extended to work with SWSHs. See the conventions summary or Boyle for more details. The matrix is tridiagonal and purely imaginary, so its element type is Complex{T} rather than T.
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
There are no corresponding Rx and Ry functions; see Lx for why.
SphericalFunctions.Lz — Constant
Lz(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
Lz(s, ℓₘₐₓ, [T=Float64])
Lz * wCompute the angular-momentum operator associated with the $z$ direction. This is the standard $L_z$ operator, familiar from basic physics, extended to work with SWSHs. Note that this is the left Lie derivative; see Rz for the equivalent right Lie derivative. See the conventions summary or Boyle for more details.
In terms of the SWSHs, we can write the action of $L_z$ as
\[L_z {}_{s}Y_{ℓ,m} = m\, {}_{s}Y_{ℓ,m}.\]
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
SphericalFunctions.L² — Constant
L²(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
L²(s, ℓₘₐₓ, [T=Float64])
L² * wCompute the total angular-momentum operator (the Casimir operator) for spin weight s.
This is the standard $L^2$ operator, familiar from basic physics, extended to work with SWSHs. It is equal to
\[L^2 = L_x^2 + L_y^2 + L_z^2 = \frac{L_+L_- + L_-L_+ + 2L_zL_z}{2}.\]
Note that these are the left Lie derivatives, but $L^2 = R^2$, where $R$ is the right Lie derivative. See the conventions summary or Boyle for more details.
In terms of the SWSHs, we can write the action of $L^2$ as
\[L^2 {}_{s}Y_{ℓ,m} = ℓ\,(ℓ+1) {}_{s}Y_{ℓ,m}.\]
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
The ASCII alias L2 may be used in place of L²; it is public but not exported.
SphericalFunctions.L₊ — Constant
L₊(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
L₊(s, ℓₘₐₓ, [T=Float64])
L₊ * wCompute the angular-momentum raising operator. This is the standard $L_+$ operator, familiar from basic physics, extended to work with SWSHs. Note that this is the left Lie derivative; see R₊ for the equivalent right Lie derivative. See the conventions summary or Boyle for more details.
We define $L_+$ to be the raising operator for the left Lie derivative with respect to rotation about $z$: $L_z$. By definition, this implies the commutator relation $[L_z, L_+] = L_+$, which allows us to derive $L_+ = L_x + i\, L_y.$
In terms of the SWSHs, we can write the action of $L_+$ as
\[L_+ {}_{s}Y_{ℓ,m} = \sqrt{(ℓ-m)(ℓ+m+1)}\, {}_{s}Y_{ℓ,m+1}.\]
Consequently, the mode weights of a function are affected as
\[\left\{L_+(f)\right\}_{s,ℓ,m} = \sqrt{(ℓ+m)(ℓ-m+1)}\,\left\{f\right\}_{s,ℓ,m-1}.\]
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
The ASCII alias Lplus may be used in place of L₊; it is public but not exported.
SphericalFunctions.L₋ — Constant
L₋(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
L₋(s, ℓₘₐₓ, [T=Float64])
L₋ * wCompute the angular-momentum lowering operator. This is the standard $L_-$ operator, familiar from basic physics, extended to work with SWSHs. Note that this is the left Lie derivative; see R₋ for the equivalent right Lie derivative. See the conventions summary or Boyle for more details.
We define $L_-$ to be the lowering operator for the left Lie derivative with respect to rotation about $z$: $L_z$. By definition, this implies the commutator relation $[L_z, L_-] = -L_-$, which allows us to derive $L_- = L_x - i\, L_y.$
In terms of the SWSHs, we can write the action of $L_-$ as
\[L_- {}_{s}Y_{ℓ,m} = \sqrt{(ℓ+m)(ℓ-m+1)}\, {}_{s}Y_{ℓ,m-1}.\]
Consequently, the mode weights of a function are affected as
\[\left\{L_-(f)\right\}_{s,ℓ,m} = \sqrt{(ℓ-m)(ℓ+m+1)}\,\left\{f\right\}_{s,ℓ,m+1}.\]
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
The ASCII alias Lminus may be used in place of L₋; it is public but not exported.
SphericalFunctions.Rz — Constant
Rz(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
Rz(s, ℓₘₐₓ, [T=Float64])
Rz * wCompute the right angular-momentum operator associated with the $z$ direction.
This is the $R_z$ operator, much like the $L_z$ operator familiar from basic physics, but in terms of the right Lie derivative, and extended to work with SWSHs. See Lz for the equivalent left Lie derivative. See the conventions summary or Boyle for more details.
Spin-weighted functions are precisely the eigenfunctions of $R_z$, with eigenvalue equal to the spin weight. In particular,
\[R_z {}_{s}Y_{ℓ,m} = s\, {}_{s}Y_{ℓ,m}.\]
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
SphericalFunctions.R² — Constant
R²(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
R²(s, ℓₘₐₓ, [T=Float64])
R² * wCompute the total angular-momentum operator (the Casimir operator) for spin weight s, in terms of the right Lie derivative.
This is the $R^2$ operator, much like the $L^2$ operator familiar from basic physics, but in terms of the right Lie derivative, and extended to work with SWSHs. It is equal to
\[R^2 = R_x^2 + R_y^2 + R_z^2 = \frac{R_+R_- + R_-R_+ + 2R_zR_z}{2}.\]
Note that these are the right Lie derivatives, but $L^2 = R^2$, where $L$ is the left Lie derivative, so this function returns the same matrix as L². See the conventions summary or Boyle for more details.
In terms of the SWSHs, we can write the action of $R^2$ as
\[R^2 {}_{s}Y_{ℓ,m} = ℓ\,(ℓ+1) {}_{s}Y_{ℓ,m}.\]
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
The ASCII alias R2 may be used in place of R²; it is public but not exported.
SphericalFunctions.R₊ — Constant
R₊(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
R₊(s, ℓₘₐₓ, [T=Float64])
R₊ * wCompute the right angular-momentum raising operator.
This is the $R_+$ operator, much like the $L_+$ operator familiar from basic physics, but in terms of the right Lie derivative, and extended to work with SWSHs. See L₊ for the equivalent left Lie derivative. See the conventions summary or Boyle for more details.
We define $R_+$ to be the raising operator for the right Lie derivative with respect to rotation about $z$: $R_z$. By definition, this implies the commutator relation $[R_z, R_+] = R_+$, which allows us to derive $R_+ = R_x + i\, R_y.$ Because the eigenvalue of $R_z$ on a spin-weighted function is the spin weight $s$, this operator raises the spin weight by one; it is identical to the spin-raising operator ð.
In terms of the SWSHs, we can write the action of $R_+$ as
\[R_+ {}_{s}Y_{ℓ,m} = \sqrt{(ℓ-s)(ℓ+s+1)}\, {}_{s+1}Y_{ℓ,m}.\]
Consequently, the mode weights of a function are affected as
\[\left\{R_+(f)\right\}_{s+1,ℓ,m} = \sqrt{(ℓ-s)(ℓ+s+1)}\,\left\{f\right\}_{s,ℓ,m},\]
where the argument s of this function is the spin weight of the input.
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
The ASCII alias Rplus may be used in place of R₊; it is public but not exported.
SphericalFunctions.R₋ — Constant
R₋(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
R₋(s, ℓₘₐₓ, [T=Float64])
R₋ * wCompute the right angular-momentum lowering operator.
This is the $R_-$ operator, much like the $L_-$ operator familiar from basic physics, but in terms of the right Lie derivative, and extended to work with SWSHs. See L₋ for the equivalent left Lie derivative. See the conventions summary or Boyle for more details.
We define $R_-$ to be the lowering operator for the right Lie derivative with respect to rotation about $z$: $R_z$. By definition, this implies the commutator relation $[R_z, R_-] = -R_-$, which allows us to derive $R_- = R_x - i\, R_y.$ Because the eigenvalue of $R_z$ on a spin-weighted function is the spin weight $s$, this operator lowers the spin weight by one; it is the negative of the spin-lowering operator ð̄.
In terms of the SWSHs, we can write the action of $R_-$ as
\[R_- {}_{s}Y_{ℓ,m} = \sqrt{(ℓ+s)(ℓ-s+1)}\, {}_{s-1}Y_{ℓ,m}.\]
Consequently, the mode weights of a function are affected as
\[\left\{R_-(f)\right\}_{s-1,ℓ,m} = \sqrt{(ℓ+s)(ℓ-s+1)}\,\left\{f\right\}_{s,ℓ,m},\]
where the argument s of this function is the spin weight of the input.
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
The ASCII alias Rminus may be used in place of R₋; it is public but not exported.
SphericalFunctions.ð — Constant
ð(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
ð(s, ℓₘₐₓ, [T=Float64])
ð * wCompute the spin-raising operator $\eth$.
This operator was originally defined by Newman and Penrose, but is more completely defined by Boyle. It is identical to R₊; see the conventions summary.
By definition, the spin-raising operator satisfies the commutator relation $[R_z, \eth] = \eth$ (recall that $R_z$ multiplies a spin-weighted function by its spin weight). In terms of the SWSHs, we can write the action of $\eth$ as
\[\eth {}_{s}Y_{ℓ,m} = \sqrt{(ℓ-s)(ℓ+s+1)}\, {}_{s+1}Y_{ℓ,m}.\]
Consequently, the mode weights of a function are affected as
\[\left\{\eth f\right\}_{s+1,ℓ,m} = \sqrt{(ℓ-s)(ℓ+s+1)}\,\left\{f\right\}_{s,ℓ,m},\]
where the argument s of this function is the spin weight of the input.
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
The ASCII alias eth may be used in place of ð; it is public but not exported.
SphericalFunctions.ð̄ — Constant
ð̄(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])
ð̄(s, ℓₘₐₓ, [T=Float64])
ð̄ * wCompute the spin-lowering operator $\bar{\eth}$.
This operator was originally defined by Newman and Penrose, but is more completely defined by Boyle. It is the negative of R₋: $\bar{\eth} = -R_-$; the sign is Newman and Penrose's. See the conventions summary.
By definition, the spin-lowering operator satisfies the commutator relation $[R_z, \bar{\eth}] = -\bar{\eth}$ (recall that $R_z$ multiplies a spin-weighted function by its spin weight). In terms of the SWSHs, we can write the action of $\bar{\eth}$ as
\[\bar{\eth} {}_{s}Y_{ℓ,m} = -\sqrt{(ℓ+s)(ℓ-s+1)}\, {}_{s-1}Y_{ℓ,m}.\]
Consequently, the mode weights of a function are affected as
\[\left\{\bar{\eth} f\right\}_{s-1,ℓ,m} = -\sqrt{(ℓ+s)(ℓ-s+1)}\,\left\{f\right\}_{s,ℓ,m},\]
where the argument s of this function is the spin weight of the input.
The argument ℓₘᵢₙ may be omitted, in which case it defaults to abs(s). The result acts on a vector of mode weights ordered as [f(ℓ, m) for ℓ ∈ ℓₘᵢₙ:ℓₘₐₓ for m ∈ -ℓ:ℓ]; any entries with $ℓ < |s|$ are mapped to zero. The indices s, ℓₘᵢₙ and ℓₘₐₓ may be integers of type Int or half-odd-integers, the latter given as HalfOddIntegers or as Rational{Int}s with denominator 2 — as in L²(1//2, 7//2) — in which case every $ℓ$ and $m$ of the ordering is a half-odd-integer. The indices in one call must all be of one kind; a call that mixes them, such as L²(1//2, 0, 7//2), is refused, as is an index of any other type (see IndexType). The matrices of operators that change the spin weight can be multiplied together only when they share the range of $ℓ$, so ℓₘᵢₙ must then be given explicitly, as in ð̄(1, 0, ℓₘₐₓ) * ð(0, 0, ℓₘₐₓ).
The argument T is the real floating-point type in which the entries are computed; it defaults to Float64. The matrix is returned as a Diagonal, Bidiagonal or Tridiagonal matrix of element type T, except that the entries of Ly are of type Complex{T}.
Applied to a ModeWeights w instead, as op(w) or op * w, the operator returns new mode weights over the same range of $ℓ$, with the spin weight changed by Δspin, and it does so without building the matrix; mul!(w′, op, w) writes the result into w′. A product such as ð̄ * ð * w applies the operators from right to left. See DifferentialOperator for the details.
The ASCII alias ethbar may be used in place of ð̄; it is public but not exported.
SphericalFunctions.DifferentialOperator — Type
DifferentialOperatorThe abstract type of the twelve angular-momentum operators, each of which is a singleton instance of its own subtype.
The operators are L², Lz, L₊, L₋, Lx and Ly, built from the left Lie derivative, and R², Rz, R₊, R₋, ð and ð̄, built from the right one. Each of them op can be used in these ways:
op(s, ℓₘᵢₙ, ℓₘₐₓ, [T=Float64])andop(s, ℓₘₐₓ, [T=Float64])return the matrix of the operator acting on mode weights of spin weights, as described in the docstring of each operator.op(w)andop * w, for aModeWeightsw, return the mode weights of the result, without building the matrix. They are labelled with the spin weightspin(w) + Δspin(op)(seeΔspin) and with the range of $ℓ$ ofw; modes below the new $|s|$ are zero rather than dropped. The element type is that of the product of the matrix entries and the weights, so thatLyapplied to real weights gives complex ones.mul!(w′, op, w)writes the same result intow′, which must be labelled with that spin weight and range of $ℓ$ and must not share storage withw, since the banded operators read neighboring modes.w′may also be a bare vector at least as long as the result, in which case the result is returned as aModeWeightsover its first entries.a * b * wfor operatorsaandbisa * (b * w), so a product of operators is applied from right to left, as the notation means. No product of two operators on their own is defined.- In a broadcast, an operator is a scalar, so that
ð .* wsappliesðto each element of a collectionwsof mode weights, asð.(ws)does.
For finite data, op * w agrees with the product of the matrix and the weights under ==. Where the weights are not finite the two can differ, because the stored zero diagonal of a banded matrix turns an infinite weight into a NaN in the row of that mode, which op * w does not.
This type is provided for dispatch. It is not an extension point: the behavior of each operator is set by internal traits and coefficient functions, which are not part of the public interface, so a new subtype defined elsewhere would not work.
SphericalFunctions.Δspin — Function
Δspin(op)
Deltaspin(op)The change in spin weight produced by the operator op: 1 for ð and R₊, -1 for ð̄ and R₋, and 0 for the other operators.
This is the amount by which the spin weight of op * w differs from that of the mode weights w, and so it is what a destination for mul! must be labelled with:
w′ = ModeWeights( similar(parent(w)), spin(w) + Δspin(ð), SphericalFunctions.ℓₘᵢₙ(w), SphericalFunctions.ℓₘₐₓ(w))mul!(w′, ð, w)The ASCII alias Deltaspin may be used in place of Δspin. Neither name is exported.
SphericalFunctions.L2 — Constant
L2An ASCII alias of the operator L², for use where the Unicode name is inconvenient.
SphericalFunctions.Lplus — Constant
LplusAn ASCII alias of the operator L₊, for use where the Unicode name is inconvenient.
SphericalFunctions.Lminus — Constant
LminusAn ASCII alias of the operator L₋, for use where the Unicode name is inconvenient.
SphericalFunctions.R2 — Constant
R2An ASCII alias of the operator R², for use where the Unicode name is inconvenient.
SphericalFunctions.Rplus — Constant
RplusAn ASCII alias of the operator R₊, for use where the Unicode name is inconvenient.
SphericalFunctions.Rminus — Constant
RminusAn ASCII alias of the operator R₋, for use where the Unicode name is inconvenient.
SphericalFunctions.eth — Constant
ethAn ASCII alias of the operator ð, for use where the Unicode name is inconvenient.
SphericalFunctions.ethbar — Constant
ethbarAn ASCII alias of the operator ð̄, for use where the Unicode name is inconvenient.