def get_indexes(r_peak_times, window):
    """ computes zero-based indexes of windows for RR-Interval averages

    :param r_peak_times: data point locations of R-peaks, in seconds
    :param window: desired window width, in seconds
    :return: array of indexes
    """

    indexes = []
    multiplier = 1
    for i in range(0, len(r_peak_times)):
        if r_peak_times[i] >= multiplier*window:
            indexes.append(i)
            multiplier += 1
    return indexes