, pha3
def parse_phase(pha1, pha2, T1, T2):
pha12 = np.zeros_like(pha1)
# 计算Delta(如果满足条件,输出左侧...,否则右侧)
pha12 = np.where(pha1 >= pha2, pha1 - pha2, pha1 - pha2 + 2 * np.pi)
# # 跟下面这段代码等价...= pha1[idx] - pha2[idx]
# else:
# pha12[idx] = pha1[idx] - pha2[idx] + 2 * np.pi...pha23, T23 = parse_phase(pha2, pha3, T2, T3)
pha123, T123 = parse_phase(pha12, pha23, T12, T23...)
plt.plot(X, pha12, label="pha12")
plt.plot(X, pha23, label="pha23")
plt.plot(X, pha123