How to use the harmonica.ellipsoid.EllipsoidManager.set function in harmonica

To help you get started, we’ve selected a few harmonica examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github fatiando / harmonica / harmonica / ellipsoid.py View on Github external
...     name="TINY",
    ...     semimajor_axis=1,
    ...     inverse_flattening=1,
    ...     geocentric_grav_const=10,
    ...     angular_velocity=1,
    ... )
    >>> with set_ellipsoid(myell):
    ...     print(get_ellipsoid().name)
    TINY
    >>> print(get_ellipsoid().name)
    WGS84

    """
    if ellipsoid in KNOWN_ELLIPSOIDS:
        ellipsoid = ReferenceEllipsoid(**KNOWN_ELLIPSOIDS[ellipsoid])
    return EllipsoidManager(ellipsoid).set()