English: README, CLAUDE.md, archive note; sessions/ (ex seances); the session of the 2026-11-16 trial (NORDEND, S1 kept)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
2cb0c88a2b
commit
63bebbc415
19 files changed
+689
-39
No files matched your search
@@ -0,0 +1,26 @@
|
||||
"""Print the raw episodes of every detector (before classification) touching a range, computed on the range plus its 3 days of history (as score.py). Usage: python3 raw_episodes.py <detectors dir> <station folder> FROM TO [detector names, comma-separated]"""
|
||||
import inspect
|
||||
import sys
|
||||
from datetime import timedelta
|
||||
|
||||
sys.path.insert(0, sys.argv[1] + "/scripts")
|
||||
import categories # noqa: E402
|
||||
from data import iso, load, parse_time # noqa: E402
|
||||
|
||||
folder, start, end = sys.argv[2], iso(parse_time(sys.argv[3])), iso(parse_time(sys.argv[4]))
|
||||
only = sys.argv[5].split(",") if len(sys.argv) > 5 else None
|
||||
ms = load(folder)
|
||||
h, b = parse_time(start) - timedelta(days=3), parse_time(end)
|
||||
chunk = {s: k for s, v in ms.items() if (k := [m for m in v if h <= m["t"] < b])}
|
||||
for mod in categories.detectors():
|
||||
name = mod.__name__.removeprefix("detector_")
|
||||
if only and name not in only:
|
||||
continue
|
||||
params = inspect.signature(mod.detect).parameters
|
||||
kw = {k: categories._context(folder, k) for k in categories.CONTEXT if k in params}
|
||||
if "end" in params:
|
||||
kw["end"] = None
|
||||
for e in mod.detect(chunk, **kw):
|
||||
if e["end"] >= start and e["start"] < end:
|
||||
print(name, e["start"], "→", e["end"], e["kind"], "|", e["label"], e.get("level", ""), "|", len(e["sensors"]),
|
||||
",".join(e["sensors"][:6]), "|", e["text"][:90])
|
||||
Reference in new issue
Block a user