Skip to content

fix(review): open a folder of Batch Pose videos as a cohort - #241

Merged
gbradham merged 1 commit into
mainfrom
fix/review-tracked-video-folder
Nov 3, 2026
Merged

gbradham merged 1 commit into
mainfrom
fix/review-tracked-video-folder

Conversation

@gbradham

@gbradham gbradham commented Nov 3, 2026

Copy link
Copy Markdown
Member

Problem

A folder of videos run through Batch Pose (each video beside its …DLC_<model>.csv, _raw companion and _zones folder) could not be opened in Session Review:

  • Open recording folder reported that it "holds no GLIDER recording … and no ethogram_raw.csv".
  • Open folder as cohort found no sessions, because a bare video only counted as a session if the pup pass had left a _pups.npz beside it.

Fix

  • discover_sessions now treats a video as a session when find_pose_csv finds its pose CSV, the same way pup-tracked videos already work. A video that already has a session is skipped so it is not listed twice: an ethogram scored from it, its pup session, or the GLIDER recording that filmed it (whose tracking the recording session already reads). Behaviour for existing cohorts is unchanged.
  • open_path: when a folder is not one recording and does not hold exactly one ethogram, it now opens every session it finds as a cohort, instead of showing the error. The error still appears when nothing is found, or when the folder is a recording that failed to load.
  • The empty-cohort message now also mentions videos with pose or pup tracking.

Verification

  • New tests: test_a_video_tracked_by_batch_pose_is_a_session, test_a_pose_tracked_video_with_another_session_is_not_listed_twice, and TestOpenVideo::test_a_folder_of_pose_tracked_videos_opens_them_all.
  • tests/unit/analysis and tests/unit/gui/behavior: 2183 passed. ruff and black are clean.
  • On a real folder of 7 rat open-field videos on the lab share, Open recording folder loaded all 7 as a cohort in 2.3 s with no error dialogs. Each session got its own DLC_train-18.csv and its full length (675–695 s).

A folder of videos run through Batch Pose holds no recording and no
ethogram, so Open recording folder reported nothing to open and Open
folder as cohort found no sessions. A video beside its DLC pose CSV is
now a cohort session, like a pup-tracked video, unless an ethogram, pup
session or the recording that filmed it already shows it. Open
recording folder on a folder that is not one recording opens every
session in it.
@gbradham
gbradham merged commit d55f72e into main Nov 3, 2026
4 checks passed
@gbradham
gbradham deleted the fix/review-tracked-video-folder branch November 3, 2026 20:39
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