common: take ROIAzimuthal phi as plain floats, not optionals
Build Packages / build:rpm (ubuntu2404_nocuda) (push) Successful in 10m48s
Build Packages / build:rpm (ubuntu2204_nocuda) (push) Successful in 11m35s
Build Packages / build:rpm (rocky8_nocuda) (push) Successful in 12m2s
Build Packages / build:rpm (rocky8_sls9) (push) Successful in 12m58s
Build Packages / build:rpm (rocky8) (push) Successful in 13m0s
Build Packages / build:rpm (rocky9_nocuda) (push) Successful in 13m58s
Build Packages / build:rpm (rocky9_sls9) (push) Successful in 14m29s
Build Packages / XDS test (durin plugin) (push) Successful in 7m30s
Build Packages / Generate python client (push) Successful in 39s
Build Packages / Build documentation (push) Successful in 51s
Build Packages / Create release (push) Skipped
Build Packages / build:rpm (ubuntu2404) (push) Successful in 10m11s
Build Packages / build:rpm (ubuntu2204) (push) Successful in 10m55s
Build Packages / build:rpm (rocky9) (push) Successful in 12m15s
Build Packages / XDS test (JFJoch plugin) (push) Successful in 9m11s
Build Packages / XDS test (neggia plugin) (push) Successful in 8m33s
Build Packages / DIALS test (push) Successful in 12m0s
Build Packages / Unit tests (push) Successful in 57m36s

The phi bounds were stored as plain floats internally but passed through
std::optional in the constructor, which obscured the intent. Take them
as float arguments defaulting to 0 instead. The convention is explicit:
phi_min == phi_max means the full ring (all angles), a sector wraps
across 0 when phi_min > phi_max, and otherwise phi_min <= phi_max. The
"both bounds or none" rule belongs at the API/file boundary
(OpenAPIConvert, reader), not in the core class, so it lives there now.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-19 11:03:40 +02:00
co-authored by Claude Opus 4.8
parent 6b95600260
commit eadbce51bd
5 changed files with 28 additions and 31 deletions
+5 -3
View File
@@ -226,9 +226,11 @@ TEST_CASE("ROIAzimuthal_Phi_Normalize", "[ROIMap]") {
REQUIRE(sector.GetPhiMin_deg() == 330.0f);
REQUIRE(sector.GetPhiMax_deg() == 40.0f);
// Only one phi bound provided -> treated as full ring
ROIAzimuthal one_bound("roi2", 2.0, 4.0, 30.0f);
REQUIRE_FALSE(one_bound.HasPhi());
// Default (no phi bounds) and equal bounds are both the full ring
ROIAzimuthal full("roi2", 2.0, 4.0);
REQUIRE_FALSE(full.HasPhi());
ROIAzimuthal equal_bounds("roi3", 2.0, 4.0, 45.0f, 45.0f);
REQUIRE_FALSE(equal_bounds.HasPhi());
}
TEST_CASE("ROIAzimuthal_Phi_MarkROI", "[ROIMap]") {