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 @@
|
||||
"""Fast deviations of corr_x/corr_y (vs median of +-N neighbours), flagged instants and coverage by non-thermal labels."""
|
||||
import sys, json, statistics
|
||||
sys.path.insert(0, 'tools/scripts')
|
||||
import data
|
||||
D = 'labeling/auto/analyses/NORDEND_2026-08-10T0115_2026-08-23T0515/'
|
||||
S, E = data.parse_time('2026-08-10T01:15Z'), data.parse_time('2026-08-23T05:15Z')
|
||||
K = float(sys.argv[1]) if len(sys.argv) > 1 else 6
|
||||
N = int(sys.argv[2]) if len(sys.argv) > 2 else 4
|
||||
labs = [json.loads(l) for l in open(D + 'work/existing.jsonl')]
|
||||
labs = [(data.parse_time(l['start']), data.parse_time(l['end']), l['id'], l['family']) for l in labs if l['family'] != 'Thermal displacement']
|
||||
allm = data.load('data/NORDEND')
|
||||
flags = {}
|
||||
for s, ms in allm.items():
|
||||
ms = data.filter_window(ms, S, E)
|
||||
for c in ('corr_x', 'corr_y'):
|
||||
v = [(m['t'], m[c]) for m in ms if m[c] is not None]
|
||||
if len(v) < 20: continue
|
||||
noise = statistics.median(abs(v[i+1][1]-v[i][1]) for i in range(len(v)-1))
|
||||
for i, (t, x) in enumerate(v):
|
||||
nb = [y for _, y in v[max(0, i-N):i] + v[i+1:i+1+N]]
|
||||
d = (x - statistics.median(nb)) / noise if noise else 0
|
||||
if abs(d) > K:
|
||||
flags.setdefault(t, []).append(f"{s}:{c[-1]}{d:+.0f}")
|
||||
for t in sorted(flags):
|
||||
cov = [i for a, b, i, f in labs if a <= t <= b]
|
||||
print(data.iso(t), len(flags[t]), ' '.join(flags[t]), '| ' + (','.join(cov) if cov else 'UNCOVERED'))
|
||||
@@ -0,0 +1,18 @@
|
||||
"""Pose (pan, tilt, scale) at the native step around each morning, and median target corr_x deviation, to check thermal starts."""
|
||||
import sys, statistics
|
||||
sys.path.insert(0, 'tools/scripts')
|
||||
import data
|
||||
from datetime import timedelta
|
||||
cam = {p['t']: p for p in data.load_camera('data/NORDEND')}
|
||||
day0 = data.parse_time('2026-08-10T00:00Z')
|
||||
h1, h2 = (sys.argv[1], sys.argv[2]) if len(sys.argv) > 2 else ('04:00', '09:30')
|
||||
for d in range(14):
|
||||
base = day0 + timedelta(days=d)
|
||||
a = data.parse_time(base.strftime('%Y-%m-%dT') + h1 + 'Z'); b = data.parse_time(base.strftime('%Y-%m-%dT') + h2 + 'Z')
|
||||
row = []
|
||||
t = a
|
||||
while t <= b:
|
||||
p = cam.get(t)
|
||||
row.append(f"{t:%H%M} " + (f"{p['pan']*1000:+.0f}/{p['tilt']*1000:+.0f}/{(p['scale']-1)*1e5:+.0f}" if p else '-'))
|
||||
t += timedelta(minutes=15)
|
||||
print(base.strftime('%d/%m'), ' '.join(row))
|
||||
@@ -0,0 +1,15 @@
|
||||
"""Contact sheet of whole camera images (downscaled): sheet.py OUT.png TIME1 TIME2 ... (YYYYMMDDTHHMM)."""
|
||||
import sys, os, glob
|
||||
import matplotlib; matplotlib.use('Agg')
|
||||
import matplotlib.pyplot as plt
|
||||
import matplotlib.image as mpimg
|
||||
out, times = sys.argv[1], sys.argv[2:]
|
||||
n = len(times); cols = 3; rows = (n + cols - 1) // cols
|
||||
fig, axs = plt.subplots(rows, cols, figsize=(cols * 6, rows * 4))
|
||||
for ax in axs.flat: ax.axis('off')
|
||||
for ax, t in zip(axs.flat, times):
|
||||
f = sorted(glob.glob(f'data/NORDEND/images/{t}Z_*.jpg'))
|
||||
if not f: ax.set_title(t + ' none'); continue
|
||||
im = mpimg.imread(f[0])[::4, ::4]
|
||||
ax.imshow(im, cmap='gray', vmin=0, vmax=255); ax.set_title(t)
|
||||
plt.tight_layout(); plt.savefig(out, dpi=60); print(out)
|
||||
@@ -0,0 +1,17 @@
|
||||
"""Write labels.jsonl: existing labels kept as they are (without id), two corrected (review dropped)."""
|
||||
import json
|
||||
D = 'labeling/auto/analyses/NORDEND_2026-08-10T0115_2026-08-23T0515/'
|
||||
fix = {
|
||||
"NORDEND-40": "No measurement at the end of the night, for a few hours: all the curves are missing from 04:00 to 06:00. The images and the system metrics are missing too from 04:00; the voltage is normal before and after. The image and a synchronisation (last_sync) come back at 06:00, one acquisition before the first measurement (06:15): at that instant the station is running and only the measurement is missing. No other station has data on that date to compare; cause not established. The curves resume without any offset of their own (the pose started with the morning, in the thermal cycle labelled separately): nothing to do.",
|
||||
"NORDEND-49": "Thermal cycle of the camera, poorly compensated. In the morning, when the housing heats up, the camera turns all at once (tilt rising, pan dropping, scale changing); the raw positions of all the targets and references move together. The compensation does not erase everything: the corr_x of PR18, PR14, PR16 and PR15 drops markedly, the corr_y of PR18 rises, then the curves come back in the afternoon; the camera then comes back slowly, in the evening and all night (the pan rises again), until the start of the next morning. The following night is the coldest of the batch: as the housing temperature keeps falling, the camera keeps turning (scale dropping, rotation and pan rising), the registration error rises, and the reference CTR04 slides a little downward against the targets while CTR02 slides the other way; through the compensation, the corr_y of most targets rises a little and stays up from midnight to the end of the night (PR15, PR07, PR10, PR06, PR14, PR16 above all, and the reference CTR02, while CTR03 goes down), then comes back as the housing warms up in the next morning. The targets do not move relative to each other, their error_value stays at its level, and the reference thumbnails show sharp spots, although lit cobweb threads cross the image all night (20:00 and 03:00 images). Deduced cause: the pose follows the housing temperature, and the rock face of the quarry cannot move with the temperature. This is not a movement of the structure: nothing to do.",
|
||||
}
|
||||
out = []
|
||||
for l in open(D + 'work/existing.jsonl'):
|
||||
d = json.loads(l)
|
||||
i = d.pop('id')
|
||||
if i in fix:
|
||||
d.pop('review', None); d['description'] = fix[i]
|
||||
out.append(d)
|
||||
with open(D + 'labels.jsonl', 'w') as f:
|
||||
for d in out: f.write(json.dumps(d, ensure_ascii=False) + '\n')
|
||||
print(len(out))
|
||||
Reference in new issue
Block a user