How to use the harmonica.ellipsoid.ReferenceEllipsoid 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
>>> myell = ReferenceEllipsoid(
    ...     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()
github fatiando / harmonica / harmonica / ellipsoid.py View on Github external
your own ellipsoid using :func:`harmonica.set_ellipsoid` and
    :class:`harmonica.ReferenceEllipsoid`.

    Any keyword arguments given to this function will be passed to
    :func:`print`.

    Examples
    --------

    >>> print_ellipsoids() # doctest: +ELLIPSIS
    ReferenceEllipsoid(name='GRS80', ...)
    ReferenceEllipsoid(name='WGS84', ...)

    """
    for ellipsoid in sorted(KNOWN_ELLIPSOIDS):
        print(ReferenceEllipsoid(**KNOWN_ELLIPSOIDS[ellipsoid]), **kwargs)