Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[bumpversion]
current_version = 4.1.1
current_version = 4.1.2
commit = True
tag = True
tag_name = v{new_version}
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
</p>

<p align="center">
<a href="https://github.com/RFingAdam/RFlect/releases"><img src="https://img.shields.io/badge/version-4.1.1-blue" alt="Version"></a>
<a href="https://github.com/RFingAdam/RFlect/releases"><img src="https://img.shields.io/badge/version-4.1.2-blue" alt="Version"></a>
<img src="https://img.shields.io/badge/python-3.11+-green" alt="Python">
<a href="LICENSE"><img src="https://img.shields.io/badge/license-GPL--3.0-orange" alt="License"></a>
<img src="https://img.shields.io/badge/tests-391%20passing-brightgreen" alt="Tests">
Expand Down
13 changes: 13 additions & 0 deletions RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -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.**
Expand Down
2 changes: 1 addition & 1 deletion plot_antenna/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
- Professional report generation
"""

__version__ = "4.1.1"
__version__ = "4.1.2"
__author__ = "Adam"
__license__ = "GPL-3.0"

Expand Down
35 changes: 27 additions & 8 deletions plot_antenna/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -2217,19 +2217,21 @@ 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,
)
else:
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)
Expand Down Expand Up @@ -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]
Expand All @@ -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:
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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,
)
Expand Down Expand Up @@ -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,
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion settings.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"CURRENT_VERSION": "v4.1.1"
"CURRENT_VERSION": "v4.1.2"
}