def get_index_groups(time_list):
    """Get index groups corresponding to the different time interval 
    tvals.  An index group is a pair consisting of a time interval
    time value and a list of indices corresponding to that time value. A
    dictionary will map the time interval tvals to their corresponding
    index lists.

    Inputs:
      time_list -- list of triples (tval, time_interval_time_val, ind)

    Returns:
      dictionary mapping time_interval_time_val to its index list
    """
    index_groups = {}
    for (tval, time_interval_time_val, ind) in time_list:
        if time_interval_time_val in index_groups:
            index_groups[time_interval_time_val].append(ind)
        else:
            index_groups[time_interval_time_val] = [ind]

    return index_groups