feat: 多端口权重改善和修改了采集函数

This commit is contained in:
mayge
2025-09-23 22:23:49 -04:00
parent 9a2df95f00
commit 87845cda82
6 changed files with 3729 additions and 196 deletions

View File

@@ -258,11 +258,11 @@ def noise(n:complex,coeff:float=0.05):
if __name__ == "__main__":
start_point = 0
network = rf.Network("/tmp/paramer/simulation/3000/3000.s2p")
K = 50
K = 10
full_freqences = network.f[start_point:]
noised_sampled_points = [(network.y[i][0][0]) for i in range(start_point,len(network.y))]
sampled_points = [network.y[i][0][0] for i in range(start_point,len(network.y))]
noised_sampled_points = [(network.y[i][1][1]) for i in range(start_point,len(network.y))]
sampled_points = [network.y[i][1][1] for i in range(start_point,len(network.y))]
H11,freqs = auto_select(noised_sampled_points,full_freqences,max_points=20)
poles = generate_starting_poles(2,beta_min=1e4,beta_max=freqs[-1]*1.1)
@@ -324,9 +324,9 @@ if __name__ == "__main__":
ax01 = axes[0][1]
ax01.set_title("Response i=0, j=0")
ax01.set_ylabel("Phase (deg)")
ax01.plot(network.f[start_point:], np.angle([network.y[i][0][0] for i in range(start_point,len(network.y))],deg=True), 'o', ms=4, color='red', label='Samples')
ax01.plot(network.f[start_point:], np.angle(H11_evaluated,deg=True), '-', lw=2, color='k', label='Fit')
ax01.plot(freqs, np.angle(H11,deg=True), 'x', ms=4, color='blue', label='Input Samples')
ax01.plot(full_freqences, np.angle(sampled_points,deg=True), 'o', ms=4, color='red', label='Samples')
ax01.plot(full_freqences, np.angle(fitted_points,deg=True), '-', lw=2, color='k', label='Fit')
ax01.plot(sliced_freqences, np.angle(input_points,deg=True), 'x', ms=4, color='blue', label='Input Samples')
ax01.legend(loc="best")
ax10 = axes[1][0]