auto: the analysts verified the labels of 32 periods (11 stations, up to 14 days each): 710 labels -> 835, 587 unchanged; one analysis folder per period with its report (section Verification)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
df979301b5
commit
2a5d87659b
279 files changed
+10758
-710
No files matched your search
@@ -0,0 +1,37 @@
|
||||
"""Load the window once (cached pickle in work/), helpers."""
|
||||
import os, sys, pickle
|
||||
from datetime import datetime, timedelta, timezone
|
||||
ROOT = os.path.abspath(os.path.join(os.path.dirname(__file__), "../../../../.."))
|
||||
sys.path.insert(0, os.path.join(ROOT, "tools/scripts"))
|
||||
import data
|
||||
OUT = os.path.join(os.path.dirname(__file__), "..", "work")
|
||||
CACHE = os.path.join(OUT, "cache.pkl")
|
||||
T0 = datetime(2026, 9, 29, 18, tzinfo=timezone.utc)
|
||||
T1 = datetime(2026, 10, 13, 12, tzinfo=timezone.utc)
|
||||
|
||||
def q(t):
|
||||
return t.replace(second=0, microsecond=0, minute=(t.minute // 15) * 15) if t.minute % 15 in (0,) or True else t
|
||||
|
||||
def get():
|
||||
if os.path.exists(CACHE):
|
||||
return pickle.load(open(CACHE, "rb"))
|
||||
folder = os.path.join(ROOT, "data/NORDEND")
|
||||
meas = {}
|
||||
for s, ms in data.load(folder).items():
|
||||
for m in ms:
|
||||
t = m["t"].replace(second=0, microsecond=0)
|
||||
t = t.replace(minute=(t.minute // 15) * 15)
|
||||
if T0 <= t <= T1:
|
||||
m["rej"] = m["error_value"] is not None and m["error_threshold"] is not None and m["error_value"] > m["error_threshold"]
|
||||
meas.setdefault(t, {})[s] = m
|
||||
pose = {p["t"].replace(second=0, microsecond=0): p for p in data.load_camera(folder) if T0 <= p["t"] <= T1}
|
||||
temp = {t: v for t, v in data.load_temperature(folder) if T0 <= t <= T1}
|
||||
d = dict(meas=meas, pose=pose, temp=temp)
|
||||
pickle.dump(d, open(CACHE, "wb"))
|
||||
return d
|
||||
|
||||
def T(s):
|
||||
return datetime.strptime(s, "%Y-%m-%dT%H:%MZ").replace(tzinfo=timezone.utc)
|
||||
|
||||
def fmt(t):
|
||||
return t.strftime("%m-%d %H:%M")
|
||||
Reference in new issue
Block a user