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,26 @@
|
||||
"""Rolling median (N measurements centred) of one column of chosen sensors, printed every `every` measurements.
|
||||
Usage: smooth.py START END COLUMN SENSORS [N] [every]"""
|
||||
import sys, statistics
|
||||
sys.path.insert(0, "tools/scripts")
|
||||
import data
|
||||
|
||||
start, end = data.parse_time(sys.argv[1]), data.parse_time(sys.argv[2])
|
||||
col, sensors = sys.argv[3], sys.argv[4].split(",")
|
||||
N = int(sys.argv[5]) if len(sys.argv) > 5 else 7
|
||||
every = int(sys.argv[6]) if len(sys.argv) > 6 else 6
|
||||
M = data.load("data/CLARIDEN")
|
||||
series = {}
|
||||
for s in sensors:
|
||||
ms = [m for m in M[s] if start <= m["t"] <= end]
|
||||
series[s] = {m["t"]: m[col] for m in ms}
|
||||
times = sorted(set().union(*[set(v) for v in series.values()]))
|
||||
print("time", *sensors, sep="\t")
|
||||
for i, t in enumerate(times):
|
||||
if i % every:
|
||||
continue
|
||||
row = []
|
||||
for s in sensors:
|
||||
w = [series[s].get(u) for u in times[max(0, i - N // 2): i + N // 2 + 1]]
|
||||
w = [x for x in w if x is not None]
|
||||
row.append(f"{statistics.median(w):+.3f}" if w else "-")
|
||||
print(data.iso(t), *row, sep="\t")
|
||||
Reference in new issue
Block a user