Repository navigation
Several animals in one Anipose file - #172
Merged
Merged
Conversation
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
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.
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
animalsoption (--option animals=fishA,fishB) and the file's<animal>_<keypoint>_x|y|zcolumns 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_earlook the same asfishA_nose/fishB_nose(decision D-053, option (a) as chosen).How:
readers/anipose.py: theanimalsoption,ANIPOSE_ANIMAL_COLUMNSwhen the columns do not match the list, animal names stored asidentities_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.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