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

Module elliptic

Karney's elliptic integrals and elliptic and ellipse functions.

Class Elliptic transcoded from Charles Karney's C++ class EllipticFunction to pure Python, including symmetric integrals Elliptic.fRC, Elliptic.fRD, Elliptic.fRF, Elliptic.fRG and Elliptic.fRJ as static methods.

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

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

Copyright (C) Charles Karney (2008-2024) 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:

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) or optionally the Jacobi amplitude in method Elliptic.sncndn.

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


Version: 26.01.20

Classes
  Elliperim
Singleton with various methods to compute the perimeter of an ellipse.
  Elliptic
Elliptic integrals and functions.
  EllipticError
Elliptic function, integral, convergence or other Elliptic issue.
  Elliptic3Tuple
3-Tuple (sn, cn, dn) all scalar.
Functions
 
elliperim(a, b, *deg2_1)
Compute the perimeter or an arc of an ellipse with semi-axes a and b using method Elliperim.e2k, Elliperim.E2k or Elliperim.arc.
 
elliperim_(a, b, *rad2_1)
Compute the perimeter or an arc of an ellipse with semi-axes a and b using method Elliperim.e2k, Elliperim.E2k or Elliperim.arc_.
Variables
  __all__ = _ALL_LAZY.elliptic
Function Details

elliperim (a, b, *deg2_1)

 

Compute the perimeter or an arc of an ellipse with semi-axes a and b using method Elliperim.e2k, Elliperim.E2k or Elliperim.arc.

Arguments:
  • deg2_1 - Optional, arc end and start angle (degrees), see method Elliperim.arc.
Returns:
The perimeter or arc length (scalar, same units as a and b).

elliperim_ (a, b, *rad2_1)

 

Compute the perimeter or an arc of an ellipse with semi-axes a and b using method Elliperim.e2k, Elliperim.E2k or Elliperim.arc_.

Arguments:
  • rad2_1 - Optional, arc end and start angle (radians), see method Elliperim.arc_.
Returns:
The perimeter or arc length (scalar, same units as a and b).