Fast and Stable Computations with Spherical Harmonics

Fast and Stable Computations with Spherical Harmonics

Fast and stable computations with spherical harmonics Richard Mika¨elSlevinsky Joint work with Hadrien Montanelli and Qiang Du Department of Mathematics, University of Manitoba [email protected] PDEs on the Sphere 2019 April 30, 2019 Spherical Harmonics Let µ be a positive Borel measure on D ⊂ Rn. The inner product: Z hf ; gi = f (x)g(x) dµ(x); D p 2 induces the norm kf k2 = hf ; f i and the Hilbert space L (D; dµ(x)). Let S2 ⊂ R3 denote the unit 2-sphere and let dΩ = sin θ dθ d'. Then any function f 2 L2(S2; dΩ) may be expanded in spherical harmonics: +1 +` +1 +1 X X m m X X m m f (θ; ') = f` Y` (θ; ') = f` Y` (θ; '); `=0 m=−` m=−∞ `=jmj where the expansion coefficients are: m m hY` ; f i f` = m m hY` ; Y` i 2 of 24 Spherical Harmonics For ` 2 N0 and jmj ≤ `, orthonormal spherical harmonics are defined by: s eim' (` − jmj)! Y m(x) = Y m(θ; ') = p (−1)jmj (` + 1 ) Pjmj(cos θ) : ` ` 2π 2 (` + jmj)! ` | {z } ~jmj P` (cos θ) Associated Legendre functions are defined by ultraspherical polynomials: 1 m m 1 m (m+ 2 ) P` (cos θ) = (−2) ( 2 )m sin θC`−m (cos θ): ~m The notation P` is used to denote orthonormality, and: Γ(x + n) (x) = n Γ(x) is the Pochhammer symbol for the rising factorial. 2 of 24 Synthesis and Analysis A band-limited function of degree-n on the sphere has no nonzero spherical harmonic expansion coefficient of degree-n or greater: n−1 +` X X m m fn−1(θ; ') = f` Y` (θ; '): `=0 m=−` m For a spherical harmonic Y` , ` is the degree and m is the order. The transforms of synthesis and analysis convert between representations of a band-limited function in momentum and physical spaces: Synthesis Sample a band-limited function at a set of points on S2. Analysis Convert samples on S2 to spherical harmonic expansion coefficients. Normally, an appropriate set of points is chosen to be able to perfectly reconstruct a band-limited function of degree-n. 3 of 24 Synthesis and Analysis Point sets include: Equiangular θk and 'j are equispaced and their Cartesian product is taken. These include the celebrated Driscoll{Healy (2n)(2n − 1) and McEwen{Wiaux (n − 1)(2n − 1) + 1 sampling theorems. Gaussian cos θk are Gauss{Legendre points and 'j are equispaced and their Cartesian product is taken. HEALPix procedure to generate points that correspond to a hierarchical equal area isolatitude pixelization of S2. Random with common distributions (e.g. uniformly distributed on S2). Data-driven may be treated similar to random. The na¨ıvecost of synthesis and analysis is O(n4) but it can be trivially reorganized to O(n3) for isolatitudinal point sets. 3 of 24 The Connection Problem Complementary to synthesis and analysis is the connection problem: the exact expansion of spherical harmonics in another basis. The sphere is doubly periodic and supports a bivariate Fourier series. The (N)FFT solves synthesis and analysis with bivariate Fourier series. eim' Y m(θ; ') = p P~m(cos θ) ) in longitude, we are done. ` 2π ` ~m The problem is to convert P` (cos θ) to Fourier series. (m+ 1 ) ~m m 2 Since P` (cos θ) / sin θC`−m (cos θ), the intuition is that ~m even-ordered P` are trigonometric polynomials in cos θ; and, ~m odd-ordered P` are trigonometric polynomials in sin θ. Conversions are not one-to-one. The connection problem is an analogue of the McEwen{Wiaux sampling theorem. 4 of 24 Connection vs. Synth. & Anal. 10 10 2 SHTns SHTns 10 11 2 FT FT 10 12 10 13 Relative Error 10 14 10 15 102 103 104 n + 1 5 of 24 Fast Transforms Fast transforms should: have an O(n2 logO(1) n) run-time with a similar pre-computation for synthesis and analysis or the connection problem; be (backward) stable; and, be fast in practice. Algorithms may be classified: as either exact in exact arithmetic and unstable in floating-point arithmetic, and numerically stable algorithms in fixed precision that are approximate to some arbitrarily small tolerance ; as either acceleration of synthesis and analysis (>10), or acceleration of the connection problem (3); or, by analytical apparatus: split-Legendre functions, WKB approximation, the fast multipole method (FMM), and the butterfly algorithm. 6 of 24 The SH Connection Problem Definition Let fφn(x)gn≥0 be a family of orthogonal functions with respect to L2(D^; dµ^(x)); and, let f n(x)gn≥0 be another family of orthogonal functions with respect to L2(D; dµ(x)). The connection coefficients: h `; φnidµ c`;n = ; h `; `idµ allow for the expansion: 1 X φn(x) = c`;n `(x): `=0 7 of 24 The SH Connection Problem Theorem Let fφn(x)gn≥0 and f n(x)gn≥0 be two families of orthonormal functions with respect to L2(D; dµ(x)). Then the connection coefficients satisfy: 1 X c`;mc`;n = δm;n: `=0 Any matrix A 2 Rm×n, m ≥ n, with orthonormal columns is well-conditioned and Moore{Penrose pseudo-invertible A+ = A>. ~m For every m, the P` (x) are a family of orthonormal functions for the same Hilbert space L2([−1; 1]; dx). 7 of 24 The SH Connection Problem Definition Let Gn denote the real Givens rotation: 01 ··· 0 0 0 ··· 01 B: :: : : : :C B: : : : : :C B C B0 ··· cn 0 sn ··· 0C B C Gn = B0 ··· 0 1 0 ··· 0C ; B C B0 · · · −sn 0 cn ··· 0C B C B: : : : :: :C @: : : : : :A 0 ··· 0 0 0 ··· 1 where the sines and the cosines are in the intersections of the nth and n + 2nd rows and columns, embedded in the identity of a conformable size. 7 of 24 The SH Connection Problem Theorem (Slevinsky 2017a) ~m+2 ~m The connection coefficients between Pn+m+2(cos θ) and P`+m(cos θ) are: s 8 (` + 2m)! (n + m + 5 )n! > (2` + 2m + 1)(2m + 2) 2 ; for ` ≤ n; ` + n even; > 1 > (` + m + 2 )`! (n + 2m + 4)! m < s c`;n = (n + 1)(n + 2) > − ; for ` = n + 2; > > (n + 2m + 3)(n + 2m + 4) : 0; otherwise: Furthermore, the matrix of connection coefficients (m) (m) (m) (m) (m) C = G0 G1 ··· Gn−1Gn I(n+3)×(n+1), where the sines and cosines are: s s (n + 1)(n + 2) (2m + 2)(2n + 2m + 5) sm = ; and cm = : n (n + 2m + 3)(n + 2m + 4) n (n + 2m + 3)(n + 2m + 4) 7 of 24 The SH Connection Problem \Proof." W.l.o.g., consider m = 0 and n = 5. 0 0:91287 0:0 0:31623 0:0 0:17593 0:0 1 B 0:0 0:83666 0:0 0:39641 0:0 0:24398 C B C B−0:40825 0:0 0:70711 0:0 0:3934 0:0 C B C (0) B 0:0 −0:54772 0:0 0:60553 0:0 0:37268 C C = B C B 0:0 0:0 −0:63246 0:0 0:5278 0:0 C B C B 0:0 0:0 0:0 −0:69007 0:0 0:46718 C B C @ 0:0 0:0 0:0 0:0 −0:73193 0:0 A 0:0 0:0 0:0 0:0 0:0 −0:76376 7 of 24 The SH Connection Problem (0)> \Proof." Apply the Givens rotation G0 : 01:0 0:0 0:0 0:0 0:0 0:0 1 B0:0 0:83666 0:0 0:39641 0:0 0:24398 C B C B0:0 0:0 0:7746 0:0 0:43095 0:0 C B C (0)> (0) B0:0 −0:54772 0:0 0:60553 0:0 0:37268 C G C = B C 0 B0:0 0:0 −0:63246 0:0 0:5278 0:0 C B C B0:0 0:0 0:0 −0:69007 0:0 0:46718 C B C @0:0 0:0 0:0 0:0 −0:73193 0:0 A 0:0 0:0 0:0 0:0 0:0 −0:76376 7 of 24 The SH Connection Problem \Proof." And again: 01:0 0:0 0:0 0:0 0:0 0:0 1 B0:0 1:0 0:0 0:0 0:0 0:0 C B C B0:0 0:0 0:7746 0:0 0:43095 0:0 C B C (0)> (0)> (0) B0:0 0:0 0:0 0:72375 0:0 0:44544 C G G C = B C 1 0 B0:0 0:0 −0:63246 0:0 0:5278 0:0 C B C B0:0 0:0 0:0 −0:69007 0:0 0:46718 C B C @0:0 0:0 0:0 0:0 −0:73193 0:0 A 0:0 0:0 0:0 0:0 0:0 −0:76376 7 of 24 The SH Connection Problem \Proof." And again: 01:0 0:0 0:0 0:0 0:0 0:0 1 B0:0 1:0 0:0 0:0 0:0 0:0 C B C B0:0 0:0 1:0 0:0 0:0 0:0 C B C (0)> (0)> (0)> (0) B0:0 0:0 0:0 0:72375 0:0 0:44544 C G G G C = B C 2 1 0 B0:0 0:0 0:0 0:0 0:68139 0:0 C B C B0:0 0:0 0:0 −0:69007 0:0 0:46718 C B C @0:0 0:0 0:0 0:0 −0:73193 0:0 A 0:0 0:0 0:0 0:0 0:0 −0:76376 7 of 24 The SH Connection Problem \Proof." And again: 01:0 0:0 0:0 0:0 0:0 0:0 1 B0:0 1:0 0:0 0:0 0:0 0:0 C B C B0:0 0:0 1:0 0:0 0:0 0:0 C B C (0)> (0)> (0)> (0)> (0) B0:0 0:0 0:0 1:0 0:0 0:0 C G G G G C = B C 3 2 1 0 B0:0 0:0 0:0 0:0 0:68139 0:0 C B C B0:0 0:0 0:0 0:0 0:0 0:6455 C B C @0:0 0:0 0:0 0:0 −0:73193 0:0 A 0:0 0:0 0:0 0:0 0:0 −0:76376 7 of 24 The SH Connection Problem \Proof." And again: 01:0 0:0 0:0 0:0 0:0 0:0 1 B0:0 1:0 0:0 0:0 0:0 0:0 C B C B0:0 0:0 1:0 0:0 0:0 0:0 C B C (0)> (0)> (0)> (0)> (0)> (0) B0:0 0:0 0:0 1:0 0:0 0:0 C G G G G G C = B C 4 3 2 1 0 B0:0 0:0 0:0 0:0 1:0 0:0 C B C B0:0 0:0 0:0 0:0 0:0 0:6455 C B C @0:0 0:0 0:0 0:0 0:0 0:0 A 0:0 0:0 0:0 0:0 0:0 −0:76376 7 of 24 The SH Connection Problem \Proof." And finally: 01:0 0:0 0:0 0:0 0:0 0:01 B0:0 1:0 0:0 0:0 0:0 0:0C B C B0:0 0:0 1:0 0:0 0:0 0:0C B C (0)> (0)> (0)> (0)> (0)> (0)> (0) B0:0 0:0 0:0 1:0 0:0 0:0C G G G G G G C = B C 5 4 3 2 1 0 B0:0 0:0 0:0 0:0 1:0 0:0C B C B0:0 0:0 0:0 0:0 0:0 1:0C B C @0:0 0:0 0:0 0:0 0:0 0:0A 0:0 0:0 0:0 0:0 0:0 0:0 7 of 24 The SH Connection Problem \Proof." Schematically: (m) C : I = : : (m) (m) G0 ··· Gn Conversion between neighbouring layers is O(n) flops and storage.

View Full Text

Details

  • File Type
    pdf
  • Upload Time
    -
  • Content Languages
    English
  • Upload User
    Anonymous/Not logged-in
  • File Pages
    56 Page
  • File Size
    -

Download

Channel Download Status
Express Download Enable

Copyright

We respect the copyrights and intellectual property rights of all users. All uploaded documents are either original works of the uploader or authorized works of the rightful owners.

  • Not to be reproduced or distributed without explicit permission.
  • Not used for commercial purposes outside of approved use cases.
  • Not used to infringe on the rights of the original creators.
  • If you believe any content infringes your copyright, please contact us immediately.

Support

For help with questions, suggestions, or problems, please contact us