jax.scipy.special.sph_harm#
- jax.scipy.special.sph_harm(m, n, theta, phi, n_max=None)[源代码]#
计算球谐函数。
注意
此函数已弃用,应改用
sph_harm_y()
,请注意m
和n
的顺序已反转,theta
和phi
的定义已交换。JAX 版本增加了一个额外的参数 n_max,即 n 中的最大值。
度为 n、阶为 m 的球谐函数可写为 \(Y_n^m(\theta, \phi) = N_n^m * P_n^m(\cos \phi) * \exp(i m \theta)\),其中 \(N_n^m = \sqrt{\frac{\left(2n+1\right) \left(n-m\right)!} {4 \pi \left(n+m\right)!}}\) 是归一化因子,\(\phi\) 和 \(\theta\) 分别是余纬和经度。\(N_n^m\) 的选择方式使得球谐函数构成 \(L^2(S^2)\) 的一组标准正交基函数。
- 参数:
m (Array) – 谐波的阶;必须满足 |m| <= n。对于 |m| > n 的返回值未定义。
n (Array) – 谐波的度;必须满足 n >= 0。在球谐函数描述中的标准表示法是 l (小写 L)。为了与 scipy.special.sph_harm 一致,这里使用 n。对于 n < 0 的返回值未定义。
theta (Array) – 方位角(经度)坐标;必须在 [0, 2*pi] 范围内。
phi (Array) – 极角(余纬)坐标;必须在 [0, pi] 范围内。
n_max (int | None) – 最大度 max(n)。如果提供的 n_max 不是 n 的实际最大值,则结果会被裁剪到 n_max。例如,sph_harm(m=jnp.array([2]), n=jnp.array([10]), theta, phi, n_max=6) 实际上返回 sph_harm(m=jnp.array([2]), n=jnp.array([6]), theta, phi, n_max=6)
- 返回:
包含在 (m, n, theta, phi) 处的球谐函数的 1D 数组。
- 返回类型: