Skip to content

Session Review: drawn arena, N x N grid, and exploration % - #237

Merged
gbradham merged 1 commit into
mainfrom
feat/review-arena-grid
Oct 30, 2026
Merged

gbradham merged 1 commit into
mainfrom
feat/review-arena-grid

Conversation

@gbradham

Copy link
Copy Markdown
Member

Summary

  • See the arena: Session Review finds each session's drawn arena and outlines it on the video. It looks for a saved <session>_arena.json beside the session or its video, then for the batch's pose_calibration.json. A new Arena menu (Draw arena… / Load arena…) saves one beside the session. A new Arena transport toggle shows or hides the outline and grid.
  • Grid: Range tab → Exploration → Grid (Off, 2×2 … 20×20), remembered in settings. Cells are laid out in floor centimetres and mapped through the arena homography, so under a tilted camera every cell is the same patch of floor. Round and plus-maze arenas count only cells whose centre is on the floor.
  • Exploration statistic: cells entered, % explored and the time to enter every cell over the selected range. Visited cells are shaded on the video. The numbers are also new epoch-table metrics and appear in the CSV exports for every session in the cohort.

New Qt-free module: glider/analysis/behavior/exploration.py.

Notes

  • A cell counts as entered after a single scored frame of the body centre inside it. There is no minimum time in the cell yet.
  • Live recordings don't save the arena corners, so they need "Draw arena…" once.

Test plan

  • tests/unit/analysis/behavior/test_exploration.py: geometry, perspective, coverage counts, window limits, finding the arena file and the batch calibration
  • TestArenaGrid in tests/unit/gui/behavior/test_analysis_window.py: inspector numbers, grid change, Off, missing arena, cohort rows and metric catalog, saving, painting
  • Session Review, analysis and onboarding suites: 2449 passed; ruff and black clean
  • Try it on a real cohort with a drawn arena

…xplored

Session Review now finds each session's arena (a saved <session>_arena.json,
else the batch's pose_calibration.json) and outlines it on the video. An
Arena menu draws or loads one and saves it beside the session.

The Range tab gets an Exploration section: pick a grid (Off, 2x2 ... 20x20),
and it reports cells entered, % explored and the time to enter every cell.
The grid is laid out in floor centimetres and mapped through the arena's
homography, so cells cover equal floor under a tilted camera; round and
plus-maze arenas count only cells on the floor. Visited cells are shaded,
and the numbers reach the epoch table and the CSV exports.
@gbradham
gbradham merged commit e37166e into main Oct 30, 2026
4 checks passed
@gbradham
gbradham deleted the feat/review-arena-grid branch October 30, 2026 02:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant