Utility Functions

instaseis.helpers.elliptic_to_geocentric_latitude(lat, axis_a=6378137.0, axis_b=6356752.314245)[source]

Convert a latitude defined on an ellipsoid to a geocentric one.

Parameters
  • lat – The latitude to convert.

  • axis_a – The length of the major axis of the planet. Defaults to the value of the WGS84 ellipsoid.

  • axis_b – The length of the minor axis of the planet. Defaults to the value of the WGS84 ellipsoid.

>>> elliptic_to_geocentric_latitude(0.0)
0.0
>>> elliptic_to_geocentric_latitude(90.0)
90.0
>>> elliptic_to_geocentric_latitude(-90.0)
-90.0
>>> elliptic_to_geocentric_latitude(45.0)
44.80757678401642
>>> elliptic_to_geocentric_latitude(-45.0)
-44.80757678401642
instaseis.helpers.geocentric_to_elliptic_latitude(lat, axis_a=6378137.0, axis_b=6356752.314245)[source]

Convert a geocentric latitude to one defined on an ellipsoid.

Parameters
  • lat – The latitude to convert.

  • axis_a – The length of the major axis of the planet. Defaults to the value of the WGS84 ellipsoid.

  • axis_b – The length of the minor axis of the planet. Defaults to the value of the WGS84 ellipsoid.

>>> geocentric_to_elliptic_latitude(0.0)
0.0
>>> geocentric_to_elliptic_latitude(90.0)
90.0
>>> geocentric_to_elliptic_latitude(-90.0)
-90.0
>>> geocentric_to_elliptic_latitude(45.0)
45.19242321598358
>>> geocentric_to_elliptic_latitude(-45.0)
-45.19242321598358