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
+20
@@ -0,0 +1,20 @@
|
||||
"""Print error_value (with its ratio to the sensor's median over the window read and to its threshold) and corr_x, corr_y of given sensors on a window. Usage: python3 sensor_values.py <detectors dir> <station folder> SENSORS(comma) FROM TO [MEDIAN_FROM]"""
|
||||
import statistics
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, sys.argv[1] + "/scripts")
|
||||
from data import iso, load # noqa: E402
|
||||
|
||||
folder, sensors, a, b = sys.argv[2], sys.argv[3].split(","), sys.argv[4], sys.argv[5]
|
||||
m0 = sys.argv[6] if len(sys.argv) > 6 else "0000"
|
||||
ms = load(folder)
|
||||
for s in sensors:
|
||||
ev = [m["error_value"] for m in ms[s] if m["error_value"] is not None and m0 <= iso(m["t"]) < b]
|
||||
med = statistics.median(ev)
|
||||
print(f"== {s} median {med:.3f}")
|
||||
for m in ms[s]:
|
||||
if a <= iso(m["t"]) <= b:
|
||||
e, th = m["error_value"], m["error_threshold"]
|
||||
f = lambda x: " - " if x is None else f"{x:7.3f}" # noqa: E731
|
||||
print(iso(m["t"]), f(e), f"x{e / med:4.2f}" if e else "", f"/th {e / th:4.2f}" if e and th else "",
|
||||
f(m["corr_x"]), f(m["corr_y"]))
|
||||
Reference in new issue
Block a user