利用PyAEDT抓取資料
import pyaedt
import matplotlib.pyplot as plt
app = pyaedt.Hfss("D:/demo_pyaedt/OptimTee.aedt",
'TeeModel',
non_graphical=True,
new_desktop_session=True,
close_on_exit=True,
student_version=False)
try:
f, m = [], []
x = app.post.get_report_data("dB(S(2,1))")
except:
pass
finally:
app.close_desktop()
for freq in x.solutions_data_mag['dB(S(2,1))']:
mag = x.solutions_data_mag['dB(S(2,1))'][freq]
f.append(freq[0])
m.append(-mag)
plt.plot(f, m)
plt.grid()
plt.xlabel('Freq')
plt.ylabel('mag')
plt.show()


沒有留言:
張貼留言