Skip to content

Several animals in one Anipose file - #172

Merged
mbel-tech merged 2 commits into
mainfrom
claude/project-thread-s4y5cm
Oct 16, 2026
Merged

mbel-tech merged 2 commits into
mainfrom
claude/project-thread-s4y5cm

Conversation

@mbel-tech

Copy link
Copy Markdown
Owner

Before: An Anipose pose-3d file was read as one animal, so a recording of several animals needed one file each, and group metrics were never offered for native 3-D projects.

After: List the animals' column prefixes in the new animals option (--option animals=fishA,fishB) and the file's <animal>_<keypoint>_x|y|z columns become that many animals of one session, in the order given. Without the option nothing changes. Group metrics are offered when every native file of the project lists several animals.

The prefixes are named by the user, never guessed, because left_ear / right_ear look the same as fishA_nose / fishB_nose (decision D-053, option (a) as chosen).

How:

  • readers/anipose.py: the animals option, ANIPOSE_ANIMAL_COLUMNS when the columns do not match the list, animal names stored as identities_labels.
  • metrics/availability.py, readers/native3d.py: group metrics allowed when every native session holds two or more animals.
  • preprocess/identity_switch.py, preprocess/pipeline.py: the step reports the permutation it applied, and the native z follows it, so a corrected swap keeps each animal's height. This replaces the old warning that z could end up on the wrong animal.
  • Docs: design note, user guide, METRICS_SPEC, INTEROPERABILITY, wiki Compatibility, CHANGELOG, D-053.

Tests: reader tests for two animals, order, underscores in prefixes, mismatched columns and cutoffs; gating tests for several-animal, one-animal and mixed projects; an end-to-end add and run with GL-16; a pipeline test that z stays with its animal after a swap. Full suite: 4787 passed, 219 skipped; ruff clean. Synthetic files only, like the rest of the reader.

🤖 Generated with Claude Code

https://claude.ai/code/session_01N7hYfMaQFqSMBtq9ZWJ3gV


Generated by Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N7hYfMaQFqSMBtq9ZWJ3gV
The project hash dumped folder paths with the platform separator, so the two
golden-hash tests failed on Windows on every push to main.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01N7hYfMaQFqSMBtq9ZWJ3gV
@mbel-tech
mbel-tech marked this pull request as ready for review October 16, 2026 08:38
@mbel-tech
mbel-tech merged commit 7069843 into main Oct 16, 2026
7 checks passed
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.

2 participants