Families: Displacement is something that moved and never came back; Perturbation, new, what comes back without another family's cause, nothing to do (spec 2026-11-18-displacement-split-design)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
maximeandClaude Opus 5.5 committed 2026-11-18 10:19:02 +01:00
1 parent c89c1b9976
commit df3a7120d3
6 files changed
+394 -10

No files matched your search

+3
View File
@@ -37,6 +37,9 @@ if __name__ == "__main__":
assert action("Visibility", "Poor visibility", "severe", t) == "Do not trust the curves over the range; it is not a movement.", t
assert action("Visibility", "Poor visibility", "reduced", t).startswith("Use the data over the range with care")
assert action("Displacement", "Slow drift", None, t) == "Keep watching it."
assert action("Displacement", "Lasting shift", None, t) == "Check what moved: look at the images."
assert action("Perturbation", "Sudden jump, back to normal", None, t) == "Nothing to do: it came back; ignore these points."
assert action("Perturbation", "x", None, t) == "Nothing to do: the curves came back; ignore these points."
assert action("Unknown", "x", None, t) == ""
assert message("A moved; nothing to do. The jump of 2 targets in this period has the same cause.") \
== "A moved. The jump of 2 targets in this period has the same cause."
+1 -1
View File
@@ -20,7 +20,7 @@ import sys
AUTO = os.path.join(os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "auto") # ~/aimsight-labeling/auto, or through the labeling/ link
FAMILIES = {"Visibility", "Obstruction", "Thermal displacement", "Displacement", "Target issue", "No data"}
FAMILIES = {"Visibility", "Obstruction", "Thermal displacement", "Displacement", "Perturbation", "Target issue", "No data"}
DATE = re.compile(r"^\d{4}-\d\d-\d\dT\d\d:\d\dZ$")
# A decimal comma (names such as F4.2 and dates such as 05.10 carry a dot), or a number followed by a unit.
NUMBER = re.compile(r"(?<![\w.])\d+,\d+|\b\d+\s*(noise|noises|px|°|%|MAD|mm|times)(?!\w)|\b\d+\s+(targets|measurements) (out )?of\b")