def remapSlice(start, stop, length):
    """Remap a slice to positive indices for a given
    length

    Args:
        start (int): index
        stop (int): index
        length (int): span

    Returns
        tuple: of :obj:`int`, positive start and stop index

    Raises:
        IndexError:
    """
    new_start = length - start if start < 0 else start
    new_stop = length - stop if stop < 0 else stop

    if new_stop < new_start:
        raise IndexError("Stop {} must be greater than or equal to start {}".format(stop, start))
    return start, stop