scipy.special.sph_harm#

scipy.special.sph_harm(m, n, theta, phi, out=None) = <ufunc 'sph_harm'>#

計算球諧函數。

球諧函數定義如下

\[Y^m_n(\theta,\phi) = \sqrt{\frac{2n+1}{4\pi} \frac{(n-m)!}{(n+m)!}} e^{i m \theta} P^m_n(\cos(\phi))\]

其中 \(P_n^m\) 為關聯勒壤得多函數;請參閱 lpmv

自 1.15.0 版本起已棄用:此函數已棄用,並將在 SciPy 1.17.0 中移除。請改用 scipy.special.sph_harm_y

參數:
marray_like

諧波的階數 (整數);必須符合 |m| <= n

narray_like

諧波的次數 (整數);必須符合 n >= 0。在球諧函數的描述中,這通常以 l (小寫 L) 表示。

thetaarray_like

方位角(經度)坐標;必須在 [0, 2*pi] 範圍內。

phiarray_like

極坐標(餘緯度)坐標;必須在 [0, pi] 範圍內。

outndarray, optional

用於函數值的選用輸出陣列

回傳值:
y_mncomplex scalar or ndarray

thetaphi 採樣的諧波 \(Y^m_n\)

註解

對於輸入參數 thetaphi 的含義,存在不同的慣例。在 SciPy 中,theta 是方位角,而 phi 是極角。常見的慣例正好相反,也就是 theta 作為極角,而 phi 作為方位角。

請注意,SciPy 的球諧函數包含 Condon-Shortley 相位 [2],因為它是 lpmv 的一部分。

依照 SciPy 的慣例,前幾個球諧函數為

\[\begin{split}Y_0^0(\theta, \phi) &= \frac{1}{2} \sqrt{\frac{1}{\pi}} \\ Y_1^{-1}(\theta, \phi) &= \frac{1}{2} \sqrt{\frac{3}{2\pi}} e^{-i\theta} \sin(\phi) \\ Y_1^0(\theta, \phi) &= \frac{1}{2} \sqrt{\frac{3}{\pi}} \cos(\phi) \\ Y_1^1(\theta, \phi) &= -\frac{1}{2} \sqrt{\frac{3}{2\pi}} e^{i\theta} \sin(\phi).\end{split}\]

參考文獻