harmonics function

(Hyper)spherical harmonics

(Hyper)spherical harmonics

Computation of a certain explicit representation of (hyper)spherical harmonics on c("\n\n", "Sp1:=xinRp:x=1S^{p-1}:={x\\in R^p:||x||=1}"), p2p\ge 2. Details are available in García-Portugués et al. (2024).

g_i_k(x, i = 1, k = 1, m = NULL, show_m = FALSE)

Arguments

  • x: locations in Sp1S^{p-1} to evaluate gi,kg_{i,k}. Either a matrix of size c(nx, p) or a vector of size p. Normalized internally if required (with a warning message).
  • i, k: alternative indexing to refer to the i-th (hyper)spherical harmonic of order k. i is a positive integer smaller than d_p_k and k is a non-negative integer.
  • m: (hyper)spherical harmonic index, as used in Proposition 3.1. The index is computed internally from i and k. Defaults to NULL.
  • show_m: flag to print m if computed internally when m = NULL.

Returns

A vector of size nrow(x).

Details

The implementation uses Proposition 3.1 in García-Portugués et al. (2024), which adapts Theorem 1.5.1 in Dai and Xu (2013) with the correction of typos in the normalizing constant hαh_\alpha and in the definition of the function gαg_\alpha of the latter theorem.

Examples

n <- 3e3 old_par <- par(mfrow = c(2, 3)) k <- 2 for (i in 1:d_p_k(p = 3, k = k)) { X <- r_unif_sph(n = n, p = 3, M = 1)[, , 1] col <- rainbow(n)[rank(g_i_k(x = X, k = k, i = i, show_m = TRUE))] scatterplot3d::scatterplot3d(X[, 1], X[, 2], X[, 3], color = col, axis = FALSE, pch = 19) } for (k in 0:5) { X <- r_unif_sph(n = n, p = 3, M = 1)[, , 1] col <- rainbow(n)[rank(g_i_k(x = X, k = k, i = 1, show_m = TRUE))] scatterplot3d::scatterplot3d(X[, 1], X[, 2], X[, 3], color = col, axis = FALSE, pch = 19) } par(old_par)

References

Dai, F. and Xu, Y. (2013). Approximation Theory and Harmonic Analysis on Spheres and Balls. Springer, New York. tools:::Rd_expr_doi("10.1007/978-1-4614-6660-4")

García-Portugués, E., Paindaveine, D., and Verdebout, T. (2024). On a class of Sobolev tests for symmetry of directions, their detection thresholds, and asymptotic powers. arXiv:2108.09874v2. tools:::Rd_expr_doi("10.48550/arXiv.2108.09874")

  • Maintainer: Eduardo García-Portugués
  • License: GPL-3
  • Last published: 2024-05-24