first_is_down_crossing = int(xn[ind[0]] > xn[ind[0] + 1])