How to use the harmonica.forward.utils.distance_cartesian 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 / forward / point_mass.py View on Github external
def kernel_g_easting_cartesian(
    easting, northing, upward, easting_p, northing_p, upward_p
):
    """
    Kernel function for easting component of gravitational gradient in
    Cartesian coordinates
    """
    distance = distance_cartesian(
        (easting, northing, upward), (easting_p, northing_p, upward_p)
    )
    return -(easting - easting_p) / distance ** 3
github fatiando / harmonica / harmonica / equivalent_layer / harmonic.py View on Github external
def greens_func_cartesian(east, north, upward, point_east, point_north, point_upward):
    """
    Green's function for the equivalent layer in Cartesian coordinates

    Uses Numba to speed up things.
    """
    distance = distance_cartesian(
        (east, north, upward), (point_east, point_north, point_upward)
    )
    return 1 / distance
github fatiando / harmonica / harmonica / forward / point_mass.py View on Github external
def kernel_potential_cartesian(
    easting, northing, upward, easting_p, northing_p, upward_p
):
    """
    Kernel function for gravitational potential field in Cartesian coordinates
    """
    distance = distance_cartesian(
        (easting, northing, upward), (easting_p, northing_p, upward_p)
    )
    return 1 / distance
github fatiando / harmonica / harmonica / forward / point_mass.py View on Github external
def kernel_g_northing_cartesian(
    easting, northing, upward, easting_p, northing_p, upward_p
):
    """
    Kernel function for northing component of gravitational gradient in
    Cartesian coordinates
    """
    distance = distance_cartesian(
        (easting, northing, upward), (easting_p, northing_p, upward_p)
    )
    return -(northing - northing_p) / distance ** 3
github fatiando / harmonica / harmonica / forward / point_mass.py View on Github external
def kernel_g_z_cartesian(easting, northing, upward, easting_p, northing_p, upward_p):
    """
    Kernel for downward component of gravitational gradient in Cartesian coords
    """
    distance = distance_cartesian(
        (easting, northing, upward), (easting_p, northing_p, upward_p)
    )
    # Remember that the ``g_z`` field returns the downward component of the
    # gravitational acceleration. As a consequence, it is multiplied by -1.
    # Notice that the ``g_z`` does not have the minus signal observed at the
    # compoents ``g_northing`` and ``g_easting``.
    return (upward - upward_p) / distance ** 3