auto: the long labels requalified as analyses like the others, <STATION>_<start>_<end>/ with request.json (ex long-labels/<STATION>/); their labels carry the analysis; work/ out of git
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ddb17c2189
commit
764af7d8ec
132 files changed
+125
-9256
No files matched your search
@@ -0,0 +1,20 @@
|
||||
"""Per-day rejection rate of R3 (and the other references), by day (05-16 UTC) and by night, over a window."""
|
||||
import sys, collections
|
||||
sys.path.insert(0, "tools/scripts")
|
||||
import data
|
||||
D = data.load("data/WILDSTRUBEL")
|
||||
start, end = data.parse_time(sys.argv[1]), data.parse_time(sys.argv[2])
|
||||
refs = [s for s, ms in D.items() if data.is_reference(ms)]
|
||||
print("references:", refs)
|
||||
for s in refs:
|
||||
tot = collections.Counter(); rej = collections.Counter()
|
||||
T = [0, 0]
|
||||
for m in D[s]:
|
||||
if not (start <= m["t"] < end): continue
|
||||
day = m["t"].strftime("%m-%d"); dn = "D" if 5 <= m["t"].hour < 16 else "N"
|
||||
tot[day, dn] += 1; T[0] += 1
|
||||
if data.rejected(m): rej[day, dn] += 1; T[1] += 1
|
||||
print(f"{s}: {T[1]}/{T[0]} rejected")
|
||||
if s == "R3" or "-v" in sys.argv:
|
||||
for day in sorted({d for d, _ in tot}):
|
||||
print(" ", day, " ".join(f"{dn} {rej[day,dn]}/{tot[day,dn]}" for dn in "DN" if tot[day, dn]))
|
||||
Reference in new issue
Block a user