harmonics {sphunif} | R Documentation |
(Hyper)spherical harmonics
Description
Computation of a certain explicit representation of
(hyper)spherical harmonics on
,
. Details are available in
García-Portugués et al. (2024).
Usage
g_i_k(x, i = 1, k = 1, m = NULL, show_m = FALSE)
Arguments
x |
locations in |
i , k |
alternative indexing to refer to the |
m |
(hyper)spherical harmonic index, as used in Proposition 3.1. The
index is computed internally from |
show_m |
flag to print |
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 and in the definition of
the function
of the latter theorem.
Value
A vector of size nrow(x)
.
References
Dai, F. and Xu, Y. (2013). Approximation Theory and Harmonic Analysis on Spheres and Balls. Springer, New York. 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. doi:10.48550/arXiv.2108.09874
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)