aspcol.sphericalharmonics
Functions for handling the spherical harmonic wave function and estimating the sound field coefficients
All math and translation theorems are taken from [martinMultiple2006] unless otherwise stated.
References
[martinMultiple2006] P. A. Martin, Multiple scattering: Interaction of time-harmonic waves with N obstacles, vol. 107. in Encyclopedia of mathematics and its applications, vol. 107. Cambridge, UK: Cambridge University Press, 2006.
[brunnstromBayesianSubmitted] J. Brunnström, M. B. Møller, and M. Moonen, “Bayesian sound field estimation using moving microphones,” IEEE Open Journal of Signal Processing, submitted.
[uenoSound2018] N. Ueno, S. Koyama, and H. Saruwatari, “Sound field recording using distributed microphones based on harmonic analysis of infinite order,” IEEE Signal Process. Lett., vol. 25, no. 1, pp. 135–139, Jan. 2018, doi: 10.1109/LSP.2017.2775242.
Equivalence of spherical harmonic definitions
The scipy spherical harmonic implementation is https://docs.scipy.org/doc/scipy/reference/generated/scipy.special.sph_harm.html
The Legendre polynomial (referred to as Legendre function of the first kind in Scipy documentation) definition given in Scipy is (37) after inserting the definition of the Hypergeometric function. The definition used in Martin is (30), the Rodrigues formula. The two definitions are equivalent, therefore the Legendre polynomial is consistent. https://mathworld.wolfram.com/LegendrePolynomial.html
Martins definition of the Associated Legendre Polynomial $P_n^m(t)$, found in (A.1) in [martinMultiple2006] is $P_n^m(t) = (1-t^2)^{m/2} frac{d^m}{dt^m} P_n(t)$. Scipy has almost the same definition, $S_n^m(t) = (-1)^m P_n^m(t)$, where S_n^m(t) denotes the Scipy definition. Therefore they are equivalent except for that Scipy includes the Condon-Shortley phase in the ALP.
The definition of the spherical harmonics in (3.6) in [martinMultiple2006] is equivalent to Scipy’s definition, except for the inclusion of an additional factor (-1)^m, i.e. the Condon-Shortley phase. Because the same factor is included in Scipy’s ALP but not Martin ALP, the spherical harmonic definitions are equivalent.
Functions
|
Translation operator for shd basis function, such that shd_basis(pos_orig + pos) = T(pos) @ shd_basis(pos_orig)x |
|
Translation operator for harmonic basis functions, such that shd_basis(pos_orig + pos) = T(pos) @ shd_basis(pos_orig) |
|
Harmonic coefficients of a linear directivity function |
|
Harmonic coefficients of an omnidirectional directivity function |
|
Returns a lookup table for the gaunt coefficients |
|
Gaunt coefficient G(l1, m1, l2, m2, l3) |
|
Returns the complex sound pressure at some positions using the provided spherical harmonic coefficients |
|
Spherical harmonic basis function for sound field in 3D |
|
|
|
Returns the maximum order of the spherical harmonics that is required to represent a given number of coefficients |
|
Returns the minimum order of the spherical harmonics that should be used for a given wavenumber and radius |
|
Number of coefficients required to represent a spherical harmonic function of a given order |
|
Returns a list of mode indices for each order when order = n, the degrees are only non-zero for -n <= degree <= n |
|
Constructs a vector with the index of each order and degree when order = n, the degrees are only non-zero for -n <= degree <= n |
|
Translates the provided shd_coeffs to another expansion center |
|
Computes the inner product of translated sequences of coefficients |
|
Translation operator for harmonic coefficients, such that shd_coeffs(pos_orig + pos) = T(pos) @ shd_coeffs(pos_orig) |
|
Integral of the product of three spherical harmonics |