def age_correction(start_year, T, age_vec):
    """Takes a start year, current year T and age vector of the upper bound of the age group (a_u)
     returns a vector of 0 and 1 to avoid transition to unwanted age groups """
    vec = (T - start_year) > age_vec
    return vec.astype(int)[:-1]