p3p implementation
This commit is contained in:
+12
-3
@@ -73,16 +73,25 @@ def _same_test_points_for_overlap(
|
||||
|
||||
def _build_station_testpoint_map(config: dict[str, dict[str, str | None]]) -> dict[str, str]:
|
||||
station_to_testpoint: dict[str, str] = {}
|
||||
for band in ("5G", "6G", "2G"):
|
||||
entry = config.get(band) or {}
|
||||
|
||||
def _add_entry(entry: dict[str, str | None]) -> None:
|
||||
testpoint = _norm(entry.get("test_point") or entry.get("Testpoint"))
|
||||
sta_raw = _norm(entry.get("sta") or entry.get("STA"))
|
||||
if not testpoint or not sta_raw:
|
||||
continue
|
||||
return
|
||||
for sta in sta_raw.split(","):
|
||||
sta_clean = _norm(sta)
|
||||
if sta_clean:
|
||||
station_to_testpoint[sta_clean] = testpoint
|
||||
|
||||
for band in ("5G", "6G", "2G"):
|
||||
entry = config.get(band) or {}
|
||||
_add_entry(entry)
|
||||
|
||||
for station_key in ("Station 1", "Station 2", "Station 3"):
|
||||
entry = config.get(station_key) or {}
|
||||
_add_entry(entry)
|
||||
|
||||
return station_to_testpoint
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user