This is a pre-release version (latest).Go to latest (1.18.0)
{ } Raw JSON

bundles / scipy latest / scipy / special / _multiufuncs / sph_harm_y

MultiUFunc

scipy.special._multiufuncs:sph_harm_y

source: build-install/usr/lib/python3.14/site-packages/scipy/special/_multiufuncs.py

Signature

def sph_harm_y(n, m, theta, phi, *, diff_n = 0)

Summary

Spherical harmonics.

Extended Summary

They are defined as

where are the (unnormalized) associated Legendre polynomials.

Parameters

n : array_like of ints

Degree of the harmonic. Must have n >= 0. This is often denoted by l (lower case L) in descriptions of spherical harmonics.

m : array_like of ints

Order of the harmonic.

theta : array_like

Polar (colatitudinal) coordinate; must be in [0, pi].

phi : array_like

Azimuthal (longitudinal) coordinate; must be in [0, 2*pi].

diff_n : int, optional

A non-negative integer. Compute and return all derivatives up to order diff_n. Default is 0.

Returns

: ndarray or tuple of ndarray

Spherical harmonics with diff_n derivatives.

Notes

There are different conventions for the meanings of the input arguments theta and phi. In SciPy theta is the polar angle and phi is the azimuthal angle. It is common to see the opposite convention, that is, theta as the azimuthal angle and phi as the polar angle.

Note that SciPy's spherical harmonics include the Condon-Shortley phase [2] because it is part of sph_legendre_p.

With SciPy's conventions, the first several spherical harmonics are

Aliases

  • scipy.special.sph_harm_y

Referenced by