scipy 1.8.0 Pypi GitHub Homepage
Other Docs
NotesParametersReturnsBackRef
ellip_harm(h2, k2, n, p, s, signm=1, signn=1)

These are also known as Lame functions of the first kind, and are solutions to the Lame equation:

$$(s^2 - h^2)(s^2 - k^2)E''(s) + s(2s^2 - h^2 - k^2)E'(s) + (a - q s^2)E(s) = 0$$

where $q = (n+1)n$ and $a$ is the eigenvalue (not returned) corresponding to the solutions.

Notes

The geometric interpretation of the ellipsoidal functions is explained in , , . The signm and :None:None:`signn` arguments control the sign of prefactors for functions according to their type:

K : +1
L : signm
M : signn
N : signm*signn
versionadded

Parameters

h2 : float

h**2

k2 : float

k**2 ; should be larger than h**2

n : int

Degree

s : float

Coordinate

p : int

Order, can range between [1,2n+1]

signm : {1, -1}, optional

Sign of prefactor of functions. Can be +/-1. See Notes.

signn : {1, -1}, optional

Sign of prefactor of functions. Can be +/-1. See Notes.

Returns

E : float

the harmonic $E^p_n(s)$

Ellipsoidal harmonic functions E^p_n(l)

See Also

ellip_harm_2
ellip_normal

Examples

>>> from scipy.special import ellip_harm
... w = ellip_harm(5,8,1,1,2.5)
... w 2.5

Check that the functions indeed are solutions to the Lame equation:

>>> from scipy.interpolate import UnivariateSpline
... def eigenvalue(f, df, ddf):
...  r = ((s**2 - h**2)*(s**2 - k**2)*ddf + s*(2*s**2 - h**2 - k**2)*df - n*(n+1)*s**2*f)/f
...  return -r.mean(), r.std()
... s = np.linspace(0.1, 10, 200)
... k, h, n, p = 8.0, 2.2, 3, 2
... E = ellip_harm(h**2, k**2, n, p, s)
... E_spl = UnivariateSpline(s, E)
... a, a_err = eigenvalue(E_spl(s), E_spl(s,1), E_spl(s,2))
... a, a_err (583.44366156701483, 6.4580890640310646e-11)
See :

Back References

The following pages refer to to this document either explicitly or contain code examples using this.

scipy.special._ellip_harm.ellip_harm scipy.special._ellip_harm.ellip_normal scipy.special._ellip_harm.ellip_harm_2

Local connectivity graph

Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.

Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)

SVG is more flexible but power hungry; and does not scale well to 50 + nodes.

All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them


GitHub : /scipy/special/_ellip_harm.py#7
type: <class 'function'>
Commit: