[Scipy-svn] r2613 - trunk/Lib/special
scipy-svn at scipy.org
scipy-svn at scipy.org
Thu Jan 25 20:00:50 EST 2007
Author: rkern
Date: 2007-01-25 19:00:44 -0600 (Thu, 25 Jan 2007)
New Revision: 2613
Modified:
trunk/Lib/special/basic.py
Log:
Flesh out docstring for sph_harm
Modified: trunk/Lib/special/basic.py
===================================================================
--- trunk/Lib/special/basic.py 2007-01-25 20:03:57 UTC (rev 2612)
+++ trunk/Lib/special/basic.py 2007-01-26 01:00:44 UTC (rev 2613)
@@ -329,8 +329,24 @@
return jn[:(n+1)],jnp[:(n+1)]
def _sph_harmonic(m,n,theta,phi):
- """Spherical harmonic of order m,n (|m|<=n) and argument theta and phi:
- Y^m_n(theta,phi)
+ """Compute spherical harmonics.
+
+ This is a ufunc and may take scalar or array arguments like any other ufunc.
+ The inputs will be broadcasted against each other.
+
+ :Parameters:
+ - `m` : int |m| <= n
+ The order of the harmonic.
+ - `n` : int >= 0
+ The degree of the harmonic.
+ - `theta` : float [0, pi]
+ The polar (colatitudinal) coordinate.
+ - `phi` : float [0, 2*pi]
+ The azimuthal (longitudinal) coordinate.
+
+ :Returns:
+ - `y_mn` : complex float
+ The harmonic $Y^m_n$ sampled at `theta` and `phi`.
"""
x = cos(phi)
m,n = int(m), int(n)
More information about the Scipy-svn
mailing list