Package pygeodesy :: Module elliptic |
[frames] | no frames]

# Module elliptic

Karney's elliptic functions and integrals.

Class Elliptic transcoded from Charles Karney's C++ class EllipticFunction to pure Python.

Python method names follow the C++ member functions, except:

- member functions without arguments are mapped to Python properties prefixed with `"c"`, for example `E()` is property `cE`,
- member functions with 1 or 3 arguments are renamed to Python methods starting with an `"f"`, example `E(psi)` to `fE(psi)` and `E(sn, cn, dn)` to `fE(sn, cn, dn)`,
- other Python method names conventionally start with a lower-case letter or an underscore if private.

Following is a copy of Karney's EllipticFunction.hpp file `Header`.

Copyright (C) Charles Karney (2008-2021) and licensed under the MIT/X11 License. For more information, see the GeographicLib documentation.

Elliptic integrals and functions.

This provides the elliptic functions and integrals needed for `Ellipsoid`, `GeodesicExact`, and `TransverseMercatorExact`. Two categories of function are provided:

- functions to compute symmetric elliptic integrals
- methods to compute Legrendre's elliptic integrals and Jacobi elliptic functions.

In the latter case, an object is constructed giving the modulus `k` (and optionally the parameter `alpha`). The modulus (and parameter) are always passed as squares which allows `k` to be pure imaginary. (Confusingly, Abramowitz and Stegun call `m = k**2` the "parameter" and `n = alpha**2` the "characteristic".)

In geodesic applications, it is convenient to separate the incomplete integrals into secular and periodic components, e.g.

`E(phi, k) = (2 E(k) / pi) [ phi + delta E(phi, k) ]`

where `delta E(phi, k)` is an odd periodic function with period `pi`.

The computation of the elliptic integrals uses the algorithms given in B. C. Carlson, Computation of real or complex elliptic integrals (also available here), Numerical Algorithms 10, 13--26 (1995) with the additional optimizations given here.

The computation of the Jacobi elliptic functions uses the algorithm given in R. Bulirsch, Numerical Calculation of Elliptic Integrals and Elliptic Functions, Numerische Mathematik 7, 78--90 (1965).

The notation follows NIST Digital Library of Mathematical Functions chapters 19 and 22.

Version: 21.06.30

Classes
| EllipticError Elliptic integral, function, convergence or other Elliptic issue.
| Elliptic3Tuple 3-Tuple `(sn, cn, dn)` all `scalar`.
| Elliptic Elliptic integrals and functions.

Variables
| __all__ = `_ALL_LAZY.elliptic`