From 74547ac90a4bfeeace3ffb5a3aec41252eb7cfb0 Mon Sep 17 00:00:00 2001 From: RFingAdam Date: Tue, 10 Feb 2026 11:41:30 -0600 Subject: [PATCH 1/3] fix: Use dynamic data_label in maritime plot titles for active vs passive - Conical cuts, GOA, 3D masked, and horizon stats titles now show "Gain (dBi)" for passive and "Power (dBm)" for active data - Added theta cut range to conical and GOA titles - Added max/min/avg summary annotation to GOA plot Co-Authored-By: Claude Opus 4.6 --- plot_antenna/plotting.py | 35 +++++++++++++++++++++++++++-------- 1 file changed, 27 insertions(+), 8 deletions(-) diff --git a/plot_antenna/plotting.py b/plot_antenna/plotting.py index 5c616d2..64d4f37 100644 --- a/plot_antenna/plotting.py +++ b/plot_antenna/plotting.py @@ -2217,11 +2217,13 @@ def plot_conical_cuts( else: ax.plot(phi_deg, cut_gain, color=colors[i], label=f"θ={theta_cut}°", linewidth=1.5) + theta_range_str = f"θ={theta_cuts[0]}–{theta_cuts[-1]}°" + if polar: ax.set_theta_zero_location("N") ax.set_theta_direction(-1) ax.set_title( - f"Conical Cuts - {data_label} @ {frequency} MHz", + f"Conical Cuts - {data_label} ({data_unit}) @ {frequency} MHz\n{theta_range_str}", pad=20, fontsize=14, ) @@ -2229,7 +2231,7 @@ def plot_conical_cuts( ax.set_xlabel("Phi (degrees)") ax.set_ylabel(f"{data_label} ({data_unit})") ax.set_title( - f"Gain over Azimuth - {data_label} @ {frequency} MHz", + f"{data_label} over Azimuth @ {frequency} MHz — {theta_range_str}", fontsize=14, ) ax.grid(True, alpha=0.3) @@ -2260,9 +2262,10 @@ def plot_gain_over_azimuth( save_path=None, ): """ - Plot Gain-over-Azimuth (Cartesian view of conical cuts) with -3 dB reference. + Plot data over Azimuth (Cartesian view of conical cuts) with -3 dB reference. - Thin wrapper around plot_conical_cuts with polar=False and a dedicated filename. + Uses data_label/data_unit to label axes and title correctly for Gain (dBi) + or Power (dBm) depending on whether passive or active data is provided. """ if theta_cuts is None: theta_cuts = [60, 70, 80, 90, 100, 110, 120] @@ -2281,10 +2284,26 @@ def plot_gain_over_azimuth( ax.axhline(y=-3, color="red", linestyle="--", alpha=0.5, linewidth=1, label="-3 dB ref") ax.set_xlabel("Phi (degrees)") ax.set_ylabel(f"{data_label} ({data_unit})") - ax.set_title(f"Gain over Azimuth @ {frequency} MHz", fontsize=14) + theta_range_str = f"θ={theta_cuts[0]}–{theta_cuts[-1]}°" + ax.set_title(f"{data_label} over Azimuth @ {frequency} MHz — {theta_range_str}", fontsize=14) ax.legend(loc="upper right", bbox_to_anchor=(1.2, 1.0), fontsize=8) ax.grid(True, alpha=0.3) + # Summary annotation: max / min / avg across all cuts + all_cuts = np.concatenate([gain_2d[np.argmin(np.abs(theta_deg - tc)), :] for tc in theta_cuts]) + max_v = np.max(all_cuts) + min_v = np.min(all_cuts) + avg_v = 10 * np.log10(np.mean(10 ** (all_cuts / 10))) + summary = f"Max: {max_v:.1f} {data_unit} Min: {min_v:.1f} {data_unit} Avg: {avg_v:.1f} {data_unit}" + ax.annotate( + summary, + xy=(0.5, -0.12), + xycoords="axes fraction", + fontsize=9, + ha="center", + bbox=dict(facecolor="white", edgecolor="gray", alpha=0.8, boxstyle="round,pad=0.3"), + ) + plt.tight_layout() if save_path: @@ -2394,7 +2413,7 @@ def plot_horizon_statistics( table[0, j].set_text_props(color="white", fontweight="bold") ax_table.set_title( - f"Horizon Statistics @ {frequency} MHz", + f"Horizon {data_label} Statistics @ {frequency} MHz ({data_unit})", fontsize=14, fontweight="bold", pad=20, @@ -2572,7 +2591,7 @@ def plot_3d_pattern_masked( ax.view_init(elev=20, azim=-30) ax.set_title( - f"3D Pattern - Horizon Band {theta_highlight_min}-{theta_highlight_max}° " + f"3D {data_label} Pattern — Horizon Band {theta_highlight_min}–{theta_highlight_max}° " f"@ {frequency} MHz", fontsize=14, ) @@ -2655,7 +2674,7 @@ def generate_maritime_plots( save_path=save_path, ) - # 4. Gain-over-Azimuth (Cartesian) + # 4. Data-over-Azimuth (Cartesian) — Gain/dBi for passive, Power/dBm for active plot_gain_over_azimuth( theta_deg, phi_deg, From 24e7b08aabfd3d1bb6d4b67542c4707f2354ac68 Mon Sep 17 00:00:00 2001 From: RFingAdam Date: Tue, 10 Feb 2026 11:42:02 -0600 Subject: [PATCH 2/3] docs: Add v4.1.2 patch release notes Co-Authored-By: Claude Opus 4.6 --- RELEASE_NOTES.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/RELEASE_NOTES.md b/RELEASE_NOTES.md index e2ecdd5..47cd445 100644 --- a/RELEASE_NOTES.md +++ b/RELEASE_NOTES.md @@ -1,5 +1,18 @@ # RFlect - Release Notes +## Version 4.1.2 (02/10/2026) + +**Patch release — maritime plot title corrections.** + +### Improvements +- **Maritime plot titles**: All maritime plot titles now dynamically show "Gain (dBi)" for passive or "Power (dBm)" for active measurements instead of hardcoded "Gain" +- **Theta range in titles**: Conical cuts and Gain/Power-over-Azimuth plots now display the theta cut range in the title +- **GOA summary annotation**: Added max/min/avg summary below the Gain/Power-over-Azimuth plot +- **Horizon statistics title**: Now includes data type and unit (e.g., "Horizon Gain Statistics @ 2400 MHz (dBi)") +- **3D masked pattern title**: Now shows "3D Gain Pattern" or "3D Power Pattern" based on data type + +--- + ## Version 4.1.1 (02/09/2026) **Patch release with 8 bug fixes for v4.1.0.** From e50ba4207075b05a32af980094253984dbe48a8f Mon Sep 17 00:00:00 2001 From: RFingAdam Date: Tue, 10 Feb 2026 11:42:14 -0600 Subject: [PATCH 3/3] =?UTF-8?q?Bump=20version:=204.1.1=20=E2=86=92=204.1.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .bumpversion.cfg | 2 +- README.md | 2 +- plot_antenna/__init__.py | 2 +- pyproject.toml | 2 +- settings.json | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.bumpversion.cfg b/.bumpversion.cfg index e379b25..8171787 100644 --- a/.bumpversion.cfg +++ b/.bumpversion.cfg @@ -1,5 +1,5 @@ [bumpversion] -current_version = 4.1.1 +current_version = 4.1.2 commit = True tag = True tag_name = v{new_version} diff --git a/README.md b/README.md index e7c8818..8ecced8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@

- Version + Version Python License Tests diff --git a/plot_antenna/__init__.py b/plot_antenna/__init__.py index c2b1702..f66edc5 100644 --- a/plot_antenna/__init__.py +++ b/plot_antenna/__init__.py @@ -16,7 +16,7 @@ - Professional report generation """ -__version__ = "4.1.1" +__version__ = "4.1.2" __author__ = "Adam" __license__ = "GPL-3.0" diff --git a/pyproject.toml b/pyproject.toml index 0f97192..6331b99 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "rflect" -version = "4.1.1" +version = "4.1.2" description = "Antenna measurement visualization and analysis tool" readme = "README.md" requires-python = ">=3.11" diff --git a/settings.json b/settings.json index 9e060d8..7b160ee 100644 --- a/settings.json +++ b/settings.json @@ -1,3 +1,3 @@ { - "CURRENT_VERSION": "v4.1.1" + "CURRENT_VERSION": "v4.1.2" }