Add pick_barrier.py interactive annotator + seed CSV with 2025-07-15

pick_barrier.py loops over every tracked DB referenced by the merged
TSV, plots windowed mean inter-fly distance for all 6 ROIs in a single
figure, and lets the analyst click the moment the barrier opens. Saves
to data/metadata/barrier_opening.csv after each pick (crash-safe).
Auto-detector best-effort guess shown as orange dotted line — the
analyst always has the final say.

Output schema:
    machine_name, session_date, session_time, opening_s, trim_first_s, notes

`trim_first_s` lets us record misframed starts so downstream code can
ignore the affected window. The 5 2025-07-15 entries are seeded from
the original legacy CSV so they're not re-picked.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
Giorgio Gilestro 2026-05-01 11:58:54 +01:00
parent e20530219b
commit b46c4ac1ba
2 changed files with 315 additions and 0 deletions

View file

@ -0,0 +1,6 @@
machine_name,session_date,session_time,opening_s,trim_first_s,notes
ETHOSCOPE_076,2025-07-15,16-03-10,52,0,hand-annotated 2025-07-15 batch
ETHOSCOPE_076,2025-07-15,16-31-34,94,69,first ~66s misframed (arena partly out of frame)
ETHOSCOPE_145,2025-07-15,16-03-27,42,0,hand-annotated 2025-07-15 batch
ETHOSCOPE_145,2025-07-15,16-31-41,89,69,first ~60s misframed (arena partly out of frame)
ETHOSCOPE_268,2025-07-15,16-32-05,75,0,hand-annotated 2025-07-15 batch
1 machine_name session_date session_time opening_s trim_first_s notes
2 ETHOSCOPE_076 2025-07-15 16-03-10 52 0 hand-annotated 2025-07-15 batch
3 ETHOSCOPE_076 2025-07-15 16-31-34 94 69 first ~66s misframed (arena partly out of frame)
4 ETHOSCOPE_145 2025-07-15 16-03-27 42 0 hand-annotated 2025-07-15 batch
5 ETHOSCOPE_145 2025-07-15 16-31-41 89 69 first ~60s misframed (arena partly out of frame)
6 ETHOSCOPE_268 2025-07-15 16-32-05 75 0 hand-annotated 2025-07-15 batch