Given distances between electrodes, compute Wenner pseudo
    depths for the provided configuration

    The pseudodepth is computed after Roy & Apparao, 1971, as 0.11 times
    the distance between the two outermost electrodes. It's not really
    clear why the Wenner depths are different from the Dipole-Dipole
    depths, given the fact that Wenner configurations are a complete subset
    of the Dipole-Dipole configurations.

def _pseudodepths_wenner(configs, spacing=1, grid=None):
    """Given distances between electrodes, compute Wenner pseudo
    depths for the provided configuration

    The pseudodepth is computed after Roy & Apparao, 1971, as 0.11 times
    the distance between the two outermost electrodes. It's not really
    clear why the Wenner depths are different from the Dipole-Dipole
    depths, given the fact that Wenner configurations are a complete subset
    of the Dipole-Dipole configurations.

    """
    if grid is None:
        xpositions = (configs - 1) * spacing
    else:
        xpositions = grid.get_electrode_positions()[configs - 1, 0]

    z = np.abs(np.max(xpositions, axis=1) - np.min(xpositions, axis=1)) * -0.11
    x = np.mean(xpositions, axis=1)
    return x, z