Compute the potential superpositions of each current dipole in the
    configurations, using the provided resistivity

    Parameters
    ----------
    grid:
        crt_grid object with loaded FE grid. Used for the electrode positions
    configs_raw: numpy.ndarray
        Nx4 array containing N four-point spreads
    rho: float
        resistivity of half-space

    Returns
    -------
    potentials: list
        List containing N arrays, each of size M (nr of grid nodes)

def compute_potentials_analytical_hs(grid, configs_raw, rho):
    """Compute the potential superpositions of each current dipole in the
    configurations, using the provided resistivity

    Parameters
    ----------
    grid:
        crt_grid object with loaded FE grid. Used for the electrode positions
    configs_raw: numpy.ndarray
        Nx4 array containing N four-point spreads
    rho: float
        resistivity of half-space

    Returns
    -------
    potentials: list
        List containing N arrays, each of size M (nr of grid nodes)

    """
    potentials = []
    nodes_sorted = grid.nodes['sorted']
    nodes_raw = grid.nodes['sorted']

    for config in configs_raw:
        print('potential configs', config)
        # determine distance of all nodes to both electrodes
        e1_node = grid.get_electrode_node(config[0])
        print('e1_node', e1_node)
        electrode1 = nodes_sorted[e1_node][1:3]
        # electrode1 = nodes_sorted[config[0]][1:3]
        r1 = np.sqrt(
            (nodes_raw[:, 1] - electrode1[0]) ** 2 +
            (nodes_raw[:, 2] - electrode1[1]) ** 2
        )
        # electrode2 = nodes_sorted[config[1]][1:3]
        e2_node = grid.get_electrode_node(config[1])
        print('e2_node', e2_node)
        electrode2 = nodes_sorted[e2_node][1:3]
        r2 = np.sqrt(
            (nodes_raw[:, 1] - electrode2[0]) ** 2 +
            (nodes_raw[:, 2] - electrode2[1]) ** 2
        )
        pot1 = pot_ana(r1, rho)
        pot2 = - pot_ana(r2, rho)
        pot12 = pot1 + pot2
        potentials.append(pot12)
    return potentials