Spin-weighted spherical harmonics

This example plays with analysis of:

\[f(r) = e^{{\rm i} k\cdot r},\]

for some $k\in\mathbb{R}^3$ and where $r\in\mathbb{S}^2$, using spin-$0$ spherical harmonics.

It applies ð, the spin-raising operator, both on the spin-$0$ coefficients as well as the original function, followed by a spin-$1$ analysis to compare coefficients.

For the storage pattern of the arrays, please consult the documentation.

using FastTransforms, LinearAlgebra

The colatitudinal grid (mod $\pi$):

N = 10
θ = (0.5:N-0.5)/N
0.05:0.1:0.95

The longitudinal grid (mod $\pi$):

M = 2*N-1
φ = (0:M-1)*2/M
0.0:0.10526315789473684:1.894736842105263

Our choice of $k$ and angular parametrization of $r$:

k = [2/7, 3/7, 6/7]
r = (θ,φ) -> [sinpi(θ)*cospi(φ), sinpi(θ)*sinpi(φ), cospi(θ)]
#1 (generic function with 1 method)

On the tensor product grid, our function samples are:

F = [exp(im*(k⋅r(θ,φ))) for θ in θ, φ in φ]
10×19 Matrix{ComplexF64}:
 0.628413+0.77788im   0.613246+0.789892im   0.603399+0.79744im    0.600106+0.79992im    0.603786+0.797146im   0.613972+0.789328im   0.629387+0.777092im   0.64815+0.761513im   0.668065+0.744103im   0.686931+0.726723im  0.702801+0.711386im    0.71416+0.699982im   0.720001+0.693973im    0.71983+0.694151im  0.713662+0.700491im   0.702017+0.71216im    0.685934+0.727664im  0.666955+0.745098im   0.647044+0.762452im
 0.626742+0.779227im  0.582025+0.813171im   0.552374+0.833596im   0.542362+0.840145im    0.55355+0.832816im   0.584193+0.811615im   0.629571+0.776943im   0.68294+0.730474im   0.736952+0.675945im   0.785185+0.619262im  0.823211+0.567736im   0.848825+0.528674im   0.861428+0.507879im   0.861065+0.508495im   0.84773+0.530428im   0.821392+0.570364im   0.782715+0.62238im   0.734019+0.679129im   0.679858+0.733344im
 0.690857+0.722991im  0.625071+0.780568im   0.580335+0.814378im   0.565059+0.82505im    0.582122+0.813101im   0.628309+0.777964im   0.694941+0.719066im  0.769832+0.638246im   0.840471+0.541857im   0.897514+0.440985im  0.936972+0.349406im   0.959893+0.280368im   0.969821+0.243819im   0.969549+0.244899im  0.958985+0.283457im   0.935221+0.354065im   0.894765+0.446538im  0.836798+0.547511im    0.76563+0.643282im
 0.799876+0.600166im  0.729022+0.68449im    0.678871+0.734257im   0.661444+0.749994im   0.680901+0.732375im   0.732596+0.680663im   0.804139+0.594441im  0.878702+0.477371im   0.940401+0.340068im    0.97989+0.199537im  0.997175+0.0751106im  0.999864-0.0165003im  0.997938-0.0641824im  0.998027-0.062782im  0.999923-0.0124432im  0.996684+0.0813636im  0.978303+0.207181im  0.937478+0.348046im   0.874727+0.484617im
 0.914598+0.404364im  0.858511+0.512795im   0.815749+0.578405im   0.800419+0.599441im    0.81752+0.5759im     0.861473+0.507803im   0.917769+0.397116im  0.967817+0.251653im   0.996186+0.0872572im   0.99722-0.07452im   0.977203-0.212305im   0.950621-0.310353im    0.93288-0.360187im   0.933439-0.358735im  0.952008-0.306074im   0.978656-0.205506im   0.997827-0.065887im   0.99532+0.0966353im  0.965471+0.260509im
 0.989052+0.147569im  0.963701+0.266985im   0.939852+0.341582im   0.930644+0.365927im   0.940896+0.338696im   0.965234+0.261387im   0.990188+0.13974im   0.999905-0.0137846im  0.983699-0.179822im    0.94183-0.33609im    0.88602-0.463647im   0.834409-0.551146im   0.804097-0.594498im   0.805021-0.593247im  0.836879-0.547388im   0.889222-0.457475im   0.944703-0.327927im  0.985349-0.170549im   0.999989-0.00462386im
  0.99096-0.134156im  0.999703-0.0243628im  0.998928+0.0462861im  0.997566+0.0697274im  0.999053+0.0435207im  0.999562-0.0295972im  0.989978-0.141225im  0.960887-0.276941im   0.908431-0.418034im   0.837893-0.545834im  0.762849-0.646576im   0.700449-0.713703im   0.665602-0.746307im   0.666649-0.745372im  0.703339-0.710855im    0.76689-0.641779im   0.842129-0.539276im   0.91195-0.410301im   0.963143-0.26899im
 0.919472-0.393156im  0.950297-0.311346im   0.966254-0.257589im   0.970887-0.23954im    0.965686-0.259711im   0.948995-0.315292im    0.91723-0.398357im  0.867837-0.49685im    0.802371-0.596825im   0.727938-0.685643im  0.656033-0.754733im   0.599431-0.800426im   0.568692-0.82255im    0.569608-0.821916im  0.602006-0.798492im   0.659781-0.751458im   0.732172-0.68112im   0.806377-0.591401im   0.871077-0.491147im
  0.80566-0.592379im  0.837633-0.546233im   0.856754-0.515725im   0.862863-0.505438im   0.856026-0.516933im   0.836173-0.548466im     0.8035-0.595305im  0.759389-0.650637im   0.707251-0.706962im   0.652712-0.757606im  0.602883-0.79783im    0.564968-0.825113im   0.544739-0.838606im   0.545338-0.838216im  0.566673-0.823943im   0.605429-0.795899im   0.655721-0.755004im  0.710305-0.703894im   0.762122-0.647434im
 0.695346-0.718675im   0.70912-0.705088im   0.717813-0.696236im   0.720677-0.693271im   0.717475-0.696585im   0.708471-0.70574im    0.694445-0.719545im  0.676692-0.736266im   0.656981-0.753907im   0.637428-0.77051im   0.620269-0.784389im   0.607563-0.794272im   0.600886-0.799335im   0.601083-0.799186im  0.608129-0.793839im   0.621132-0.783706im   0.638483-0.769636im  0.658105-0.752927im    0.67776-0.735284im

We precompute a spin-$0$ spherical harmonic–Fourier plan:

P = plan_spinsph2fourier(F, 0)
FastTransforms Spin-weighted spherical harmonic--Fourier plan for 10×19-element array of ComplexF64

And an FFTW Fourier analysis plan on $\mathbb{S}^2$:

PA = plan_spinsph_analysis(F, 0)
FastTransforms plan for FFTW Fourier analysis on the sphere (spin-weighted) for 10×19-element array of ComplexF64

Its spin-$0$ spherical harmonic coefficients are:

U⁰ = P\(PA*F)
10×19 Matrix{ComplexF64}:
      2.98294-8.51991e-17im     -0.560381+0.373587im        0.560381+0.373587im        0.0307268-0.0737442im       0.0307268+0.0737442im      0.00123905+0.0063329im     -0.00123905+0.0063329im    -0.000278656-0.000280997im  -0.000278656+0.000280997im    1.91763e-5+3.91877e-6im    -1.91763e-5+3.91877e-6im    -7.51512e-7+3.05775e-7im    -7.51512e-7-3.05775e-7im     1.62607e-8-2.39542e-8im    -1.62607e-8-2.39542e-8im   -7.57573e-12+9.06989e-10im   -7.6043e-12-9.06983e-10im  -1.32856e-11-2.14392e-11im   1.44574e-11-2.09394e-11im
 -9.83939e-17+1.585im           -0.147488-0.221233im       -0.147488+0.221233im        0.0242802+0.0101168im      -0.0242802+0.0101168im       -0.001828+0.000357651im     -0.001828-0.000357651im    7.31346e-5-7.25251e-5im    -7.31346e-5-7.25251e-5im    -9.36425e-7+4.58234e-6im    -9.36425e-7-4.58234e-6im    -6.79393e-8-1.66977e-7im     6.79393e-8-1.66977e-7im     4.99533e-9+3.39094e-9im     4.99533e-9-3.39094e-9im   -1.78808e-10-1.4939e-12im    1.78807e-10-1.49874e-12im   3.97537e-12-2.47069e-12im   3.88749e-12+2.67669e-12im
    -0.296042+1.9373e-16im      0.0419095-0.0279397im     -0.0419095-0.0279397im     -0.00179667+0.00431201im    -0.00179667-0.00431201im    -5.92556e-5-0.000302862im    5.92556e-5-0.000302862im    1.12623e-5+1.13569e-5im     1.12623e-5-1.13569e-5im    -6.70874e-7-1.37097e-7im     6.70874e-7-1.37097e-7im     2.31726e-8-9.42846e-9im     2.31726e-8+9.42846e-9im   -4.48157e-10+6.60198e-10im   4.48157e-10+6.60199e-10im   1.83296e-13-2.21049e-11im   1.86671e-13+2.21043e-11im   2.77146e-13+4.85403e-13im  -3.40624e-13+4.58315e-13im
  7.69323e-17-0.0243812im      0.00315419+0.00473128im    0.00315419-0.00473128im   -0.000498246-0.000207603im   0.000498246-0.000207603im    3.42215e-5-6.6955e-6im      3.42215e-5+6.6955e-6im     -1.23971e-6+1.22938e-6im     1.23971e-6+1.22938e-6im     1.44141e-8-7.05344e-8im     1.44141e-8+7.05344e-8im    9.54963e-10+2.34704e-9im   -9.54963e-10+2.34704e-9im   -6.22737e-11-4.22728e-11im  -6.22737e-11+4.22728e-11im   2.09765e-12+1.71393e-14im  -2.09747e-12+1.79766e-14im  -5.56471e-13+3.3894e-13im   -5.39577e-13-3.78603e-13im
 -0.000199834-6.42779e-17im  -0.000327232+0.000218154im  0.000327232+0.000218154im    1.67027e-5-4.00864e-5im     1.67027e-5+4.00864e-5im      5.5389e-7+2.83099e-6im     -5.5389e-7+2.83099e-6im    -1.01124e-7-1.01974e-7im    -1.01124e-7+1.01974e-7im     5.69484e-9+1.16377e-9im    -5.69484e-9+1.16377e-9im   -1.69612e-10+6.90117e-11im  -1.69612e-10-6.90117e-11im   2.98197e-12-4.39287e-12im  -2.98201e-12-4.39288e-12im  -3.48909e-14+4.21983e-12im  -3.57157e-14-4.21966e-12im  -4.58893e-14-8.03264e-14im    5.6381e-14-7.5835e-14im
 -6.51867e-17-0.000282488im    -7.0029e-6-1.05044e-5im    -7.0029e-6+1.05044e-5im     2.24809e-6+9.36704e-7im    -2.24809e-6+9.36704e-7im    -1.76539e-7+3.45402e-8im    -1.76539e-7-3.45402e-8im     6.55393e-9-6.49931e-9im    -6.55393e-9-6.49931e-9im   -7.13679e-11+3.49235e-10im   -7.1368e-11-3.49235e-10im  -4.99715e-12-1.22817e-11im   4.99718e-12-1.22817e-11im   1.69023e-11+1.14737e-11im   1.69023e-11-1.14737e-11im  -5.44917e-13-4.41379e-15im   5.44856e-13-4.70669e-15im    1.5798e-13-9.50585e-14im   1.52381e-13+1.08137e-13im
   3.58969e-5-4.03624e-17im    -4.7402e-7+3.16014e-7im     4.7402e-7+3.16014e-7im    -3.23608e-8+7.76658e-8im    -3.23608e-8-7.76658e-8im     -1.6111e-9-8.2345e-9im       1.6111e-9-8.2345e-9im     2.28327e-10+2.30246e-10im   2.28327e-10-2.30246e-10im  -1.02557e-11-2.09579e-12im   1.02557e-11-2.09576e-12im   4.54949e-11-1.8511e-11im    4.54949e-11+1.85109e-11im  -5.65258e-13+8.32684e-13im   5.65261e-13+8.3268e-13im    9.40322e-15-1.14115e-12im   9.65269e-15+1.14112e-12im   8.76404e-15+1.53587e-14im  -1.07761e-14+1.4515e-14im
  1.02759e-16+2.64492e-6im    -5.98533e-8-8.978e-8im     -5.98533e-8+8.978e-8im      -2.2753e-10-9.48042e-11im    2.2753e-10-9.48042e-11im   2.65455e-10-5.19369e-11im   2.65455e-10+5.19368e-11im  -1.37076e-11+1.35933e-11im   1.37076e-11+1.35933e-11im   3.35969e-11-1.64405e-10im   3.35969e-11+1.64405e-10im   1.96453e-12+4.82831e-12im  -1.96456e-12+4.82829e-12im  -8.01172e-12-5.43855e-12im  -8.01172e-12+5.43851e-12im   2.15355e-13+1.72018e-15im  -2.15344e-13+1.85439e-15im  -7.69555e-14+4.59648e-14im  -7.40025e-14-5.28722e-14im
  -1.25204e-7-1.00025e-16im    6.65757e-9-4.43838e-9im   -6.65757e-9-4.43838e-9im   -1.43603e-11+3.44646e-11im  -1.43603e-11-3.44647e-11im   5.78456e-14+2.95764e-13im  -5.78679e-14+2.9576e-13im   -3.63314e-11-3.66368e-11im  -3.63314e-11+3.66367e-11im   7.38143e-13+1.50851e-13im   -7.3814e-13+1.50867e-13im  -7.24159e-12+2.94646e-12im  -7.24159e-12-2.94644e-12im   4.07073e-14-5.99537e-14im  -4.06954e-14-5.99558e-14im  -1.50601e-15+1.8179e-13im   -1.53602e-15-1.81804e-13im  -6.15023e-16-1.09078e-15im   7.91118e-16-1.04469e-15im
 -1.37837e-16-3.0609e-9im     4.29751e-10+6.44627e-10im  4.29751e-10-6.44627e-10im  -5.01384e-12-2.08911e-12im   5.01382e-12-2.08911e-12im  -3.61552e-10+7.07385e-11im  -3.61552e-10-7.07385e-11im   2.83376e-12-2.81014e-12im  -2.83376e-12-2.81015e-12im  -4.57901e-11+2.24071e-10im  -4.57901e-11-2.24071e-10im  -4.06243e-13-9.98407e-13im   4.06233e-13-9.98415e-13im   1.09292e-11+7.41901e-12im   1.09292e-11-7.41901e-12im   -4.4566e-14-3.61759e-16im   4.45481e-14-3.97552e-16im   1.05374e-13-6.28694e-14im   1.01304e-13+7.23998e-14im

We can check its $L^2(\mathbb{S}^2)$ norm against an exact result:

norm(U⁰) ≈ sqrt(4π)
true

Spin can be incremented by applying ð, either on the spin-$0$ coefficients:

U¹c = zero(U⁰)
for n in 1:N-1
    U¹c[n, 1] = sqrt(n*(n+1))*U⁰[n+1, 1]
end
for m in 1:M÷2
    for n in 0:N-1
        U¹c[n+1, 2m] = -sqrt((n+m)*(n+m+1))*U⁰[n+1, 2m]
        U¹c[n+1, 2m+1] = sqrt((n+m)*(n+m+1))*U⁰[n+1, 2m+1]
    end
end

or on the original function through analysis with spin-$1$ spherical harmonics:

F = [-(k[1]*(im*cospi(θ)*cospi(φ) + sinpi(φ)) + k[2]*(im*cospi(θ)*sinpi(φ)-cospi(φ)) - im*k[3]*sinpi(θ))*exp(im*(k⋅r(θ,φ))) for θ in θ, φ in φ]
10×19 Matrix{ComplexF64}:
   0.384531+0.240303im     0.405167+0.0811656im   0.376168-0.08059im    0.296802-0.228644im      0.17173-0.345547im    0.0121942-0.415058im     -0.164084-0.425345im    -0.334877-0.37218im      -0.47719-0.260862im    -0.571781-0.105926im  -0.607006+0.0715576im   -0.58067+0.248234im      -0.499453+0.402825im     -0.376425+0.519276im   -0.227802+0.588046im  -0.0700889+0.605739im   0.0817378+0.573795im    0.214909+0.497059im   0.318781+0.382786im
    0.16375+0.41829im      0.162116+0.268361im    0.128477+0.110061im   0.056034-0.0418675im  -0.0588234-0.167146im    -0.211042-0.242529im     -0.383203-0.247832im    -0.546769-0.173942im    -0.669506-0.0288607im   -0.726395+0.162453im  -0.708448+0.365492im   -0.624684+0.547246im      -0.496849+0.685091im     -0.350631+0.769743im   -0.208037+0.802572im  -0.0835191+0.79034im     0.016198+0.740573im   0.0899356+0.659195im    0.13893+0.55045im
 0.00394925+0.589002im   -0.0517508+0.441892im   -0.117739+0.283703im  -0.202276+0.132736im    -0.313608+0.0132761im   -0.450683-0.0475101im    -0.596088-0.0271995im   -0.717144+0.0808626im   -0.777618+0.259594im    -0.754769+0.470906im  -0.650847+0.67007im    -0.491452+0.823236im      -0.313141+0.917212im     -0.149502+0.957306im  -0.0230169+0.957535im   0.0563716+0.930505im   0.0891711+0.881918im    0.083394+0.810775im  0.0511118+0.713512im
  -0.037706+0.764342im    -0.167663+0.63523im    -0.287398+0.487323im  -0.400578+0.346904im    -0.514827+0.244114im     -0.62967+0.207393im     -0.727882+0.254883im    -0.777945+0.383583im    -0.749353+0.563975im    -0.631836+0.748617im  -0.444017+0.892859im   -0.224888+0.974245im     -0.0160482+0.997806im      0.151723+0.986424im    0.261377+0.965157im    0.306018+0.948535im    0.286044+0.935214im    0.209798+0.910832im  0.0944472+0.857391im
  0.0677134+0.90671im     -0.132933+0.832114im    -0.31272+0.722356im  -0.463011+0.610267im    -0.584223+0.531084im     -0.67363+0.512373im     -0.717075+0.564833im    -0.692616+0.674959im    -0.585463+0.805978im    -0.402896+0.912201im  -0.175697+0.960918im   0.0558086+0.947262im       0.258917+0.892857im      0.415705+0.832204im    0.518079+0.796763im    0.559103+0.802847im    0.530434+0.845158im    0.428907+0.898149im   0.265719+0.927327im
   0.292353+0.944771im    0.0581069+0.961031im   -0.162367+0.923101im  -0.343726+0.861107im    -0.474077+0.809852im    -0.546787+0.794409im     -0.553921+0.82068im      -0.48849+0.87246im     -0.353637+0.917742im    -0.169005+0.924095im  0.0340849+0.875449im    0.226308+0.779766im       0.391603+0.66433im       0.527207+0.564551im    0.633493+0.513im       0.702424+0.529934im    0.714639+0.614543im    0.649544+0.740756im   0.502126+0.864782im
   0.544556+0.82786im      0.335621+0.941682im     0.11692+0.992061im  -0.074329+0.994789im    -0.214433+0.975768im    -0.291963+0.955971im     -0.303796+0.942141im    -0.254076+0.925583im    -0.155653+0.88869im    -0.0290943+0.815954im    0.10377+0.703491im    0.228799+0.562131im       0.344287+0.414327im      0.457269+0.288908im    0.572819+0.215991im    0.682616+0.220188im    0.761104+0.310327im    0.774782+0.470071im   0.701202+0.658896im
   0.711777+0.57455im      0.575876+0.753741im    0.402359+0.877629im   0.227778+0.943189im    0.0807159+0.961489im   -0.0227441+0.946886im     -0.078234+0.908848im   -0.0903981+0.849391im   -0.0697694+0.765587im   -0.0288206+0.65453im   0.0229208+0.517715im   0.0830404+0.363193im       0.157068+0.205921im      0.254332+0.067373im    0.379593-0.026087im    0.524118-0.0484074im   0.662039+0.0163403im    0.75688+0.163406im   0.777104+0.364037im
   0.726602+0.264733im     0.673634+0.460754im    0.564658+0.62254im     0.42451+0.734172im     0.277783+0.792276im     0.142935+0.801596im     0.0303916+0.769731im   -0.0562551+0.703542im    -0.117442+0.608011im    -0.154422+0.487008im  -0.166521+0.34507im    -0.149734+0.189474im     -0.0974708+0.0321493im  -0.00385489-0.109276im    0.131046-0.212499im    0.296212-0.254862im    0.468111-0.220723im    0.615102-0.109082im   0.707182+0.0630756im
   0.597178-0.0185423im    0.601301+0.161421im    0.546217+0.32944im    0.442188+0.46657im      0.304261+0.559965im     0.149097+0.603283im   -0.00741158+0.595734im    -0.151367+0.540622im    -0.271099+0.44408im     -0.356905+0.314404im  -0.400841+0.161998im   -0.397025-0.000359286im   -0.342634-0.157415im     -0.239438-0.292068im  -0.0953011-0.38711im    0.0751723-0.428079im    0.251638-0.406595im    0.410936-0.323077im    0.53139-0.187637im

We change plans with spin-$1$ now and reanalyze:

P = plan_spinsph2fourier(F, 1)
PA = plan_spinsph_analysis(F, 1)
U¹s = P\(PA*F)
10×19 Matrix{ComplexF64}:
  4.81048e-17+2.24152im          0.792499-0.528332im        0.792499+0.528332im       -0.0752649+0.180636im       0.0752649+0.180636im     -0.00429218-0.0219378im     -0.00429218+0.0219378im      0.00124619+0.00125666im    -0.00124619+0.00125666im   -0.000105033-2.1464e-5im    -0.000105033+2.1464e-5im      4.87035e-6-1.98165e-6im    -4.87035e-6-1.98165e-6im    -1.21684e-7+1.79257e-7im    -1.21684e-7-1.79257e-7im     6.4556e-11-7.69602e-9im   -6.42651e-11-7.6961e-9im      1.3734e-10+1.99137e-10im   1.25853e-10-2.02909e-10im
    -0.725151+5.32221e-18im      0.361271+0.541907im       -0.361271+0.541907im       -0.0841092-0.0350455im     -0.0841092+0.0350455im     0.00817504-0.00159947im    -0.00817504-0.00159947im   -0.000400574+0.000397236im  -0.000400574-0.000397236im    6.06873e-6-2.9697e-5im     -6.06873e-6-2.9697e-5im      5.08411e-7+1.24954e-6im     5.08411e-7-1.24954e-6im    -4.23861e-8-2.87724e-8im     4.23861e-8-2.87724e-8im     1.69612e-9+1.41282e-11im    1.69628e-9-1.41119e-11im  -4.07203e-11+2.96639e-11im   3.63017e-11+2.53159e-11im
 -7.43762e-17-0.0844589im       -0.145179+0.096786im       -0.145179-0.096786im       0.00803495-0.0192839im    -0.00803495-0.0192839im    0.000324556+0.00165884im    0.000324556-0.00165884im    -7.29881e-5-7.36014e-5im     7.29881e-5-7.36014e-5im     5.02037e-6+1.02593e-6im     5.02037e-6-1.02593e-6im     -1.9664e-7+8.00072e-8im      1.9664e-7+8.00072e-8im     4.25378e-9-6.26388e-9im     4.25378e-9+6.26388e-9im    6.53269e-12+2.1811e-10im   -6.52146e-12+2.18144e-10im  -1.63776e-11+3.366e-12im    -1.53622e-11-3.76794e-12im
 -0.000893686-1.84222e-18im     -0.014106-0.0211589im       0.014106-0.0211589im      0.00272901+0.00113709im    0.00272901-0.00113709im   -0.00022178+4.33918e-5im     0.00022178+4.33918e-5im     9.27716e-6-9.19981e-6im     9.27716e-6+9.19981e-6im    -1.22275e-7+5.98394e-7im     1.22275e-7+5.98394e-7im    -9.06826e-9-2.22464e-8im    -9.06826e-9+2.22464e-8im    6.14926e-10+3.8178e-10im   -6.14926e-10+3.81779e-10im  -2.02946e-11+8.95683e-11im  -2.03114e-11-8.95764e-11im  -7.74583e-13-2.47296e-12im   9.78849e-13-2.19174e-12im
 -2.77419e-17-0.00154725im     0.00179232-0.00119488im    0.00179232+0.00119488im   -0.000108246+0.00025979im   0.000108246+0.00025979im   -4.14499e-6-2.11852e-5im    -4.14499e-6+2.11852e-5im     8.58374e-7+8.65614e-7im    -8.58374e-7+8.65614e-7im    -5.40698e-8-1.11423e-8im    -5.40698e-8+1.11423e-8im     1.63049e-9-7.15813e-10im   -1.63049e-9-7.15813e-10im       2.6e-10+2.34806e-10im       2.6e-10-2.34805e-10im  -9.52905e-12-1.46897e-12im   9.53119e-12-1.47348e-12im   3.24098e-12-6.83905e-13im   3.02544e-12+8.12829e-13im
  0.000232639-3.672e-17im      4.53837e-5+6.80755e-5im   -4.53837e-5+6.80755e-5im    -1.68233e-5-7.00961e-6im   -1.68233e-5+7.00961e-6im    1.49733e-6-2.92965e-7im    -1.49733e-6-2.92965e-7im    -6.18845e-8+6.17602e-8im    -6.18845e-8-6.17602e-8im    4.71847e-10-3.03855e-9im   -4.71847e-10-3.03855e-9im     1.02475e-9-3.12162e-10im    1.02475e-9+3.12161e-10im  -2.32851e-11+2.79721e-11im    2.3285e-11+2.79721e-11im   5.51359e-12-2.47804e-11im   5.51954e-12+2.47829e-11im   2.05758e-13+6.50666e-13im  -2.63466e-13+5.82305e-13im
   -2.539e-17+1.97929e-5im     3.54721e-6-2.36505e-6im    3.54721e-6+2.36505e-6im     2.74198e-7-6.5817e-7im    -2.74198e-7-6.5817e-7im     1.49997e-8+7.82205e-8im     1.49997e-8-7.82205e-8im    -2.72196e-9-2.73494e-9im     2.72196e-9-2.73494e-9im    4.22222e-10-1.58584e-9im    4.22222e-10+1.58584e-9im     1.4028e-11+4.2318e-11im   -1.40281e-11+4.2318e-11im   -7.00664e-11-6.32065e-11im  -7.00664e-11+6.32064e-11im    1.8132e-12+2.78513e-13im  -1.81361e-12+2.79436e-13im  -8.89729e-13+1.90111e-13im  -8.28862e-13-2.3028e-13im
   -1.0618e-6-1.60227e-16im    5.06265e-7+7.59331e-7im   -5.06265e-7+7.59331e-7im     2.28542e-9+1.27481e-9im    2.28542e-9-1.27481e-9im   -1.53825e-9+3.35011e-10im    1.53825e-9+3.35011e-10im   -2.24932e-9-2.42853e-9im    -2.24932e-9+2.42853e-9im    1.43487e-10+3.57671e-11im  -1.43487e-10+3.57671e-11im  -4.84249e-10+1.47683e-10im  -4.84249e-10-1.47683e-10im   9.17835e-12-1.10319e-11im  -9.17827e-12-1.10319e-11im  -2.61497e-12+1.18851e-11im  -2.61825e-12-1.18864e-11im  -8.21156e-14-2.58948e-13im   1.05894e-13-2.32289e-13im
  1.80271e-18-2.92736e-8im    -6.36569e-8+4.17996e-8im   -6.36569e-8-4.17996e-8im    6.18282e-10-1.39021e-9im  -6.18282e-10-1.39021e-9im  -4.16445e-10+7.77363e-11im  -4.16445e-10-7.77363e-11im    8.6631e-12-8.2083e-12im   -8.66306e-12-8.20835e-12im  -6.71953e-11+2.52391e-10im  -6.71953e-11-2.52391e-10im  -1.00987e-12-3.04635e-12im   1.00985e-12-3.0463e-12im    1.11584e-11+1.00647e-11im   1.11584e-11-1.00647e-11im  -1.30587e-13-2.0048e-14im    1.30633e-13-2.01267e-14im   1.41977e-13-3.03707e-14im   1.32247e-13+3.68603e-14im
   -1.3507e-9+1.40212e-16im  -3.62349e-10-4.74615e-10im  3.62349e-10-4.74615e-10im    1.35757e-9-2.98609e-9im    1.35757e-9+2.98609e-9im  -2.68037e-12-1.17672e-11im   2.68035e-12-1.17672e-11im    3.06502e-9+3.30916e-9im     3.06502e-9-3.30916e-9im    -2.9668e-11-7.39519e-12im    2.9668e-11-7.39519e-12im   6.60325e-10-2.01412e-10im   6.60325e-10+2.01411e-10im  -1.89842e-12+2.28193e-12im   1.89842e-12+2.28191e-12im   3.56751e-12-1.6238e-11im    3.57202e-12+1.62398e-11im   1.69962e-14+5.36059e-14im  -2.19325e-14+4.80988e-14im

Finally, we check $L^2(\mathbb{S}^2)$ norms against another exact result:

norm(U¹c) ≈ norm(U¹s) ≈ sqrt(8π/3*(k⋅k))
true

This page was generated using Literate.jl.