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:
maximeandClaude Opus 5.5 committed 2026-11-17 15:13:44 +01:00
1 parent df979301b5
commit 2a5d87659b
279 files changed
+10758 -710

No files matched your search

@@ -0,0 +1,32 @@
"""Print native corr_x/corr_y/error_value of chosen sensors and the pose between two instants."""
import sys, csv, glob
sys.path.insert(0, 'tools/scripts')
start, end = sys.argv[1], sys.argv[2]
sensors = sys.argv[3].split(',')
cols = sys.argv[4].split(',') if len(sys.argv) > 4 else ['corr_x', 'corr_y', 'error_value']
rows = {}
for f in sorted(glob.glob('data/FLORIDA/displacement/FLORIDA_advanced_*.csv')):
for r in csv.DictReader(open(f)):
t = r['time_utc'][:16].replace(' ', 'T') + 'Z'
if not (start <= t <= end): continue
if r['sensor_name'] in sensors:
rej = r['error_value'] and r['error_threshold'] and float(r['error_value']) > float(r['error_threshold'])
rows.setdefault(t, {})[r['sensor_name']] = (r, rej)
pose = {}
for f in sorted(glob.glob('data/FLORIDA/camera/FLORIDA_camera_*.csv')):
for r in csv.DictReader(open(f)):
t = r['time_utc'][:16].replace(' ', 'T') + 'Z'
if start <= t <= end: pose[t] = r
def fm(v):
try: return f"{float(v):8.3f}"
except: return " -"
print('time ' + ' | '.join(f"{s[:10]:>10} " + ' '.join(c[:6] for c in cols) for s in sensors) + ' | pan tilt scale')
for t in sorted(rows):
out = []
for s in sensors:
if s not in rows[t]: out.append(' missing'); continue
r, rej = rows[t][s]
out.append(('R' if rej else ' ') + ' '.join(fm(r[c]) if not (rej and c.startswith('corr')) else ' rej' for c in cols))
p = pose.get(t)
ps = f"{float(p['median_pan']):.4f} {float(p['median_tilt']):.4f} {float(p['median_scale']):.5f}" if p else 'no pose'
print(t, ' | '.join(out), '|', ps)
@@ -0,0 +1,34 @@
"""Instants where Sellette 4/5 corr deviate from a rolling local level (or a non-Target-issue sensor is rejected), not covered by an existing label."""
import csv, glob, json, statistics as st, sys
D = 'labeling/auto/analyses/FLORIDA_2026-10-11T0945_2026-10-22T0315/work/existing.jsonl'
labels = [json.loads(l) for l in open(D)]
S, E = '2026-10-11T09:45Z', '2026-10-22T03:15Z'
K = float(sys.argv[1]) if len(sys.argv) > 1 else 4
data = {}
for f in sorted(glob.glob('data/FLORIDA/displacement/FLORIDA_advanced_*.csv')):
for r in csv.DictReader(open(f)):
t = r['time_utc'][:16].replace(' ', 'T') + 'Z'
if not (S <= t <= E): continue
data.setdefault(t, {})[r['sensor_name']] = r
times = sorted(data)
def cov(t, fam=None):
return [l['id'] for l in labels if l['start'] < t < l['end'] or (l['start'] <= t <= l['end'])]
flags = {}
for s in ['Sellette 4', 'Sellette 5']:
for c in ['corr_x', 'corr_y']:
ser = [(t, float(data[t][s][c])) for t in times if s in data[t] and data[t][s][c] not in ('', None)
and float(data[t][s]['error_value']) <= float(data[t][s]['error_threshold'])]
vals = [v for _, v in ser]
noise = st.median(abs(vals[i+1]-vals[i]) for i in range(len(vals)-1))
for i, (t, v) in enumerate(ser):
nb = vals[max(0, i-8):i] + vals[i+1:i+9]
d = (v - st.median(nb)) / noise
if abs(d) > K: flags.setdefault(t, []).append(f"{s[-1]}{c[-1]}{d:+.0f}")
for t in times:
for s in ['p1_r', 'r1_r', 'Sellette 4', 'Sellette 5', 'Pont Ernen', 'Sellette 3']:
r = data[t].get(s)
if r and float(r['error_value']) > float(r['error_threshold']): flags.setdefault(t, []).append(f"{s}:REJ")
for t in sorted(flags):
c = [i for i in cov(t)]
nonthermal = [i for i in c if next(l for l in labels if l['id']==i)['family'] != 'Thermal displacement']
print(t, ' '.join(flags[t]), '| covered by', ','.join(c) or 'NONE')