The single reader: data.py of the tools repository (sibling ~/aimsight-tools), located once in categories.py

scripts/data.py removed; the detectors' standalone CLIs go (categories.py runs them).
Benchmark identical to the baseline.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-16 15:25:01 +01:00
1 parent 908369b9e9
commit 5e9a7aa9d1
11 files changed
+16 -215

No files matched your search

+1 -10
View File
@@ -32,12 +32,9 @@ belongs to the Target issue family: episodes() returns it, detect() leaves it to
daily levels); otherwise it is ignored (neither back nor too recent: only jumps of K noises or more are).
"""
import statistics
import sys
from datetime import timedelta
from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent)) # data.py, next to it
import data # noqa: E402
import data
K = 20 # tuned on E-001: at 15, two healthy targets are greyed (17 and 18 noises); the trains of E-005 (17 and 19
# noises) are caught by visibility.py: do not lower K
@@ -319,9 +316,3 @@ def drift(measurements):
"text": f"{s} drifts slowly and steadily: {d:+.2f} px in {n} days. Keep watching it.",
"ignore": False, "sensors": [s]} for d, n, a, b in r]
return out
if __name__ == "__main__":
for ep in detect(data.load(sys.argv[1])):
print(ep["start"], ep["end"], "ignore" if ep["ignore"] else "KEEP ", ep["label"], "|", len(ep["sensors"]),
",".join(ep["sensors"][:6]), "|", ep["text"])