angle_rad = [] i = 0 for i in range(len(X)): if ((Y-track.Doublewide_y[i]) <0 and (X-track.Doublewide_x[i]) <0).all: angle_rad.append(math.atan((Y-trac