import numpy as np import matplotlib.pyplot as plt #https://k6jca.blogspot.com/2019/12/vna-notes-on-12-term-error-model-and.html Gm1 = np.loadtxt('short.txt', dtype=np.complex128) Gm2 = np.loadtxt('load.txt', dtype=np.complex128) Gm3 = np.loadtxt('open.txt', dtype=np.complex128) G1 = -1 G2 = 0.1 G3 = +1 e00 = (G1*G2*Gm1*Gm3 - G1*G3*Gm1*Gm2 - G1*G2*Gm2*Gm3 + G2*G3*Gm1*Gm2 + G1*G3*Gm2*Gm3 - G2*G3*Gm1*Gm3)/(G1*G2*Gm1 - G1*G2*Gm2 - G1*G3*Gm1 + G1*G3*Gm3 + G2*G3*Gm2 - G2*G3*Gm3) e11 = -(G1*Gm2 - G2*Gm1 - G1*Gm3 + G3*Gm1 + G2*Gm3 - G3*Gm2)/(G1*G2*Gm1 - G1*G2*Gm2 - G1*G3*Gm1 + G1*G3*Gm3 + G2*G3*Gm2 - G2*G3*Gm3) d_e = -(G1*Gm1*Gm2 - G1*Gm1*Gm3 - G2*Gm1*Gm2 + G2*Gm2*Gm3 + G3*Gm1*Gm3 - G3*Gm2*Gm3)/(G1*G2*Gm1 - G1*G2*Gm2 - G1*G3*Gm1 + G1*G3*Gm3 + G2*G3*Gm2 - G2*G3*Gm3) plt.plot(e00) plt.plot(e11) plt.plot(d_e) plt.show()