Perturbation, the seventh family: a jump back to normal is a Perturbation (nothing to do, greyed), Displacement keeps the lasting shift, the jump not back yet and the slow drift (labeling spec 2026-11-18-displacement-split-design); benchmark: 0 regression, Perturbation found 0 -> 4 %, +1 code line

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-18 10:25:06 +01:00
1 parent 428ebaacfe
commit 47bc0acde2
4 files changed
+9 -8

No files matched your search

+2 -1
View File
@@ -5,7 +5,7 @@ ignore, sensors (a Poor visibility also has its level). classify() makes them ev
- a target already in an overlapping Target issue episode is dropped from an Obstruction episode: its curve is already
to be ignored;
- a jump back to normal (JUMP_BACK) overlapping a Visibility episode joins its event: rain, fog or heat shimmer
explains it; otherwise it stays Displacement, its cause to be checked on the images;
explains it; otherwise it is a Perturbation: nothing to do;
- a jump back whose targets are all in an overlapping Obstruction or Target issue episode joins it (something in front
of them explains it, or the curve of a problem target is to be ignored); a slow drift, in a Target issue episode;
- episodes of the same variety less than MERGE apart make one event (validated rule, 2026-10-24); an Obstruction or a
@@ -38,6 +38,7 @@ CATEGORIES = {
"Thermal displacement": {"ignore": False, "process": "none"},
"No data": {"ignore": False, "process": "none"},
"Displacement": {"ignore": False, "process": "check"},
"Perturbation": {"ignore": True, "process": "none"},
}
JUMP_BACK = "Sudden jump, back to normal" # the label of displacement.py
MERGE = timedelta(hours=1)
+4 -4
View File
@@ -1,11 +1,11 @@
"""Displacement family: sudden jumps of the corrected displacements (corr_x, corr_y, px) of each target, and slow drift
"""Displacement and Perturbation families: sudden jumps of the corrected displacements (corr_x, corr_y, px) of each target, and slow drift
(end of file). Global references are excluded, rejected measurements (empty corr) skipped.
1. Jump: a measurement at least K noises (median step of the series) away from the level before (median of the BASE
previous measurements).
2. Back to normal: within BACK_H, an hour of measurements in a row (BASE at most, one at least) within half the jump of
the level before; greyed, its cause not established here (categories.py joins it to an overlapping Visibility or
Obstruction episode, otherwise it is to be checked on the images). Otherwise "Lasting shift", or "Jump, not back
the level before; a Perturbation, greyed (categories.py joins it to an overlapping Visibility or
Obstruction episode, otherwise nothing to do). Otherwise "Lasting shift", or "Jump, not back
yet" with less than BACK_H of hindsight: never greyed (maybe a real movement), the episode is the jump's instant;
the new level becomes the level before.
"""
@@ -53,7 +53,7 @@ def jumps(measurements):
if len(kept) > BASE:
t, v = [m["t"] for m in kept], [m[axis] for m in kept]
found |= {(t[a], t[b], state, name) for a, b, state in _jumps(t, v)}
return [episode(a, b, "Displacement", *LABELS[state], [name], state == "back") for a, b, state, name in sorted(found)]
return [episode(a, b, "Perturbation" if state == "back" else "Displacement", *LABELS[state], [name], state == "back") for a, b, state, name in sorted(found)]
def detect(measurements):