Repository navigation
feat(review): groups, time bins, keypoint distances and a statistics engine - #235
Merged
Merged
Conversation
Select sessions in Session Review's pool (Ctrl/Shift-click), right-click, and move them to a group, a new group, or out of one. A cohort opened as a folder saves the groups to glider_project.json, keeping its subjects and other session fields; a broken manifest is never saved over. Sessions opened as files are grouped for the review only.
Export > Time bins (CSV) splits each session, on its own zero, into bins of 1, 3, 5, 10 or a custom number of minutes, tidy or wide, over the whole session or the selected range. The viewer's Distances chip draws the pixel distance between keypoint pairs; right-click it to choose the pairs, which are remembered per keypoint set.
Qt-free, scipy-only tests on the epoch and time-bin tables: group vs group, epoch vs epoch, group x epoch (mixed ANOVA with sphericity corrections) and trends across bins (per-animal slopes, polynomial contrasts, first vs last). Auto test selection explains its choice; effect sizes carry CIs. Reference values pinned against pingouin and scikit-posthocs.
Bin labels use a plain hyphen (0-1 min), and the window, epoch and time-bin exports are written with a UTF-8 byte-order mark, so Excel no longer shows an en dash or other non-ASCII range names as mojibake.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Three Session Review additions plus the statistics engine they feed.
1. Assign sessions to groups
Groups could only come from a hand-written
glider_project.json. Now:2. Time-bin export
Export → Time bins (CSV)…: bins of 1, 3, 5, 10 min or custom, over the whole session or the selected range, tidy (
bin,bin_start_s,bin_end_s) or wide. Each animal is binned on its own zero (flow start, else first frame); the last bin is clipped and labelled honestly. Width is remembered.3. Keypoint distances overlay
A Distances chip in the viewer draws the pixel distance between keypoint pairs. Right-click it for default pairs, all pairs, none, or individual pairs; the choice is remembered per keypoint set.
4. Statistics engine (
glider.analysis.stats, no UI yet)Qt-free, scipy-only, no new dependencies:
The Statistics tab and the "run everything" sweep come in a follow-up.
Tests
Session Review GUI, project manifest, cohort, epochs and stats suites: 635 passed. ruff and black clean.
🤖 Generated with Claude Code