jax.scipy.special.sph_harm

目录

jax.scipy.special.sph_harm#

jax.scipy.special.sph_harm(m, n, theta, phi, n_max=None)[源代码][源代码]#

计算球谐函数。

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)。我们在这里使用 `n 以与 scipy.special.sph_harm 保持一致。对于 n < 0 的返回值是未定义的。

  • theta (Array) – 方位角(纵向)坐标;必须在 [0, 2*pi] 范围内。

  • phi (Array) – 极坐标(余纬度);必须在 [0, π] 范围内。

  • 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 数组。

返回类型:

Array