From c17ecc24caba9a87607bb01427f21fcd4e6179f3 Mon Sep 17 00:00:00 2001 From: mayge Date: Mon, 20 Oct 2025 11:50:10 -0400 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BA=86test=E7=9A=84?= =?UTF-8?q?=E9=83=A8=E5=88=86=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 7 +------ pyproject.toml | 2 +- test/gvf_plot_poles.py | 8 ++++---- test/test_save_and_reload_model.py | 8 ++++---- 4 files changed, 10 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 16c0227..c022fb6 100644 --- a/README.md +++ b/README.md @@ -1,6 +1 @@ -1. 添加 A B C D 方法,对应不同的基 -2. 修改Levi部分和sk迭代部分,使用更通用的A B C D求解 -3. 添加正交基形式 -4. 加入多端口 -5. 引入QR,消除中间过程的残差求解,降低算法复杂度 -6. 使用最初始的表达式,获得无偏估计 \ No newline at end of file +请将 examples.tar.gz解压到此处 \ No newline at end of file diff --git a/pyproject.toml b/pyproject.toml index ec3563e..2ab07d1 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "ovf" -version = "0.1.5" +version = "0.1.6" description = "A package for orthonormal basis and rational function fitting" authors = [ {name = "M4yGem1ni", email = "M4yGem1ni@outlook.com"} diff --git a/test/gvf_plot_poles.py b/test/gvf_plot_poles.py index f934909..cdf33ec 100644 --- a/test/gvf_plot_poles.py +++ b/test/gvf_plot_poles.py @@ -1,7 +1,7 @@ from ovf.core.GVFManager import GVFManager -gvf = GVFManager.load("outputs/mtee_gvf.pkl") -# gvf = GVFManager() -# gvf.load_from_datasets("examples/data/capa.json",npoles_cplx=2,max_points=20) -# gvf.save("outputs/capa_gvf.pkl") +# gvf = GVFManager.load("outputs/mtee_gvf.pkl") +gvf = GVFManager() +gvf.load_from_datasets("examples/data/mtee.json",npoles_cplx=2,max_points=20) +gvf.save("outputs/mtee_gvf.pkl") gvf.plot_poles("outputs/mtee_poles",degree=3,geometry_1="L1",geometry_2="L2") \ No newline at end of file diff --git a/test/test_save_and_reload_model.py b/test/test_save_and_reload_model.py index 6e79ceb..5de2ee3 100644 --- a/test/test_save_and_reload_model.py +++ b/test/test_save_and_reload_model.py @@ -17,11 +17,11 @@ sampled_points = network.y.reshape(-1,ports,ports) H,freqs = auto_select_multple_ports(noised_sampled_points,full_freqences,max_points=20) def run_capa(): - vf = VFManager(npoles_cplx=2,freqs=freqs,H=H,model=MultiPortOrthonormalBasis,iterations=K,verbose=False) + vf = VFManager(npoles_cplx=2,full_freqs=freqs,full_H=H,model=MultiPortOrthonormalBasis,iterations=K,verbose=False) vf.fit() vf.plot_metrics(show=False,save_path=f"outputs/{id}") model_responses = vf.get_model_responses(full_freqences) - vf.plot_model_responses(show=False,save_path=f"outputs/{id}") + vf.plot_model_responses(full_freqs=freqs,show=False,save_path=f"outputs/{id}") # vf.export(f"outputs/{id}") vf.write(f"outputs/{id}") @@ -30,7 +30,7 @@ def load_model(): vf.plot_metrics(show=False,save_path=f"outputs/3001") model_responses = vf.get_model_responses(full_freqences) - vf.plot_model_responses(show=False,save_path=f"outputs/3001") + vf.plot_model_responses(full_freqs=freqs,show=False,save_path=f"outputs/3001") # vf.export(f"outputs/{id}") vf.write(f"outputs/3001") @@ -39,7 +39,7 @@ def load_model1(): vf.plot_metrics(show=False,save_path=f"outputs/3002") model_responses = vf.get_model_responses(full_freqences) - vf.plot_model_responses(show=False,save_path=f"outputs/3002") + vf.plot_model_responses(full_freqs=freqs,show=False,save_path=f"outputs/3002") # vf.export(f"outputs/{id}") vf.write(f"outputs/3002")