English: label map, families, labeling rules, knowledge/, validate.py (ex controle.py), ids.py, precedents.py; the labels of auto/ translated, keys start/end/family/review/analysis (manual/: keys only); analysis folders renamed; the 2026-11-16 trial analysis (NORDEND-243)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
4d926ecddc
commit
68a0eefd8b
79 files changed
+2789
-2652
No files matched your search
@@ -0,0 +1,30 @@
|
||||
"""Par jour et par cible : corr de la journée (médiane 10:00-16:00) moins la nuit
|
||||
d'avant (médiane 02:00-05:00), en bruits, sans les instants où CTR03 est rejetée.
|
||||
Usage : python3 cycle_jour.py data/NORDEND AAAA-MM-JJ[,AAAA-MM-JJ...]
|
||||
"""
|
||||
import csv, glob, sys, statistics as st
|
||||
|
||||
dossier, jours = sys.argv[1], sys.argv[2].split(',')
|
||||
rows = {}
|
||||
for f in sorted(glob.glob(f'{dossier}/displacement/*_advanced_*.csv')):
|
||||
for r in csv.DictReader(open(f)):
|
||||
if r['time_utc'][:10] in jours:
|
||||
rows.setdefault(r['time_utc'][:16], {})[r['sensor_name']] = r
|
||||
rej = lambda r: float(r['error_value']) > float(r['error_threshold'])
|
||||
bad = {t for t, d in rows.items() if 'CTR03' in d and rej(d['CTR03'])}
|
||||
cibles = sorted({n for d in rows.values() for n in d if n.startswith('PR')})
|
||||
for j in jours:
|
||||
print(f'== {j} : jour 10-16 moins nuit 02-05 (bruits), triés')
|
||||
for c in ('corr_x', 'corr_y'):
|
||||
out = []
|
||||
for n in cibles:
|
||||
def serie(h0, h1):
|
||||
return [float(d[n][c]) for t, d in sorted(rows.items()) if t[:10] == j and h0 <= t[11:13] < h1
|
||||
and t not in bad and n in d and not rej(d[n]) and d[n][c]]
|
||||
nuit, jour = serie('02', '05'), serie('10', '16')
|
||||
tout = serie('00', '24')
|
||||
if len(nuit) < 3 or len(jour) < 3: continue
|
||||
b = st.median(abs(a - b) for a, b in zip(tout, tout[1:])) or 1e-9
|
||||
out.append(((st.median(jour) - st.median(nuit)) / b, n))
|
||||
out.sort()
|
||||
print(f' {c}: ' + ' '.join(f'{n}:{v:+.0f}' for v, n in out))
|
||||
Reference in new issue
Block a user