From 71e5aa25ca92b32922d80d4c917ba3e5207d2c8f Mon Sep 17 00:00:00 2001 From: maxime Date: Fri, 20 Nov 2026 08:31:18 +0100 Subject: [PATCH] points: a dataset may be of a run of the emulator, @, its own measurements Co-Authored-By: Claude Opus 5.5 --- scripts/points.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/scripts/points.py b/scripts/points.py index 7994267..a47f0bd 100644 --- a/scripts/points.py +++ b/scripts/points.py @@ -4,7 +4,7 @@ aimsight-app (page Points). No family, no cause: the ground truth of the benchma python3 labeling/scripts/points.py # checks every dataset of points/ python3 labeling/scripts/points.py --test # the self-check of this file -A dataset: `points/__.csv` (days, UTC, end excluded), one line per measurement of the range, +A dataset: `points/__.csv` (`` a station of data/ or a run, `@`) (days, UTC, end excluded), one line per measurement of the range, `sensor_name,time_utc,valid` (`time_utc` `YYYY-MM-DDTHH:MM:SSZ`, `valid` 1 or 0), sorted by sensor then time. Created with every point valid; the measurements are those the station delivered with a position (rejected ones, without `corr_x`, `corr_y`, are not points). Standard library. @@ -17,7 +17,8 @@ from datetime import datetime, timezone FOLDER = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "points") HEADER = ["sensor_name", "time_utc", "valid"] -NAME = re.compile(r"^([A-Za-z0-9_-]+)_(\d{4}-\d{2}-\d{2})_(\d{4}-\d{2}-\d{2})$") +# a station of data/, or a run of the emulator @ (data_diff//runs//: its own measurements) +NAME = re.compile(r"^([A-Za-z0-9_-]+(?:@[A-Za-z0-9_-]+)?)_(\d{4}-\d{2}-\d{2})_(\d{4}-\d{2}-\d{2})$") TIME = "%Y-%m-%dT%H:%M:%SZ" @@ -130,6 +131,7 @@ def test(): n = name("X1", "2026-01-01", "2026-01-02") a, b = datetime(2026, 1, 1, 0, 10, tzinfo=timezone.utc), datetime(2026, 1, 1, 0, 20, tzinfo=timezone.utc) create(n, {"T2": [a], "T1": [b, a]}) + assert parts(name("X1@run01", "2026-01-01", "2026-01-02"))[0] == "X1@run01" assert all(read(n).values()) and len(read(n)) == 3 and datasets() == [n] == datasets("X1") and datasets("X") == [] p = mark(n, "T1", [time(b)], False) assert p[("T1", time(b))] is False and p[("T1", time(a))] is True and read(n) == p and check(n) == []