t_start = int(y[0] > y[1])  # first is a max, ignore it