Repository navigation
fix(readers): take a native file's horizontal plane in cyclic axis order (SP5 item 4) - #160
Merged
Merged
Conversation
horizontal_axes returned the two non-vertical axes in file order, so vertical_axis = y gave (x, z), the mirror image of the right-handed (z, x). Magnitudes were unaffected, but signed quantities (IL-11's mean heading, the sign of left_right_turn_bias) were reflected. The plane is now taken in cyclic order after the vertical axis (z: x,y; x: y,z; y: z,x). z (the default) and x are unchanged; only files read with y change. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012btUjvTQTf6i51Rpr3t8Hc
3 of 4 tasks
mbel-tech
marked this pull request as ready for review
October 11, 2026 13:13
mbel-tech
enabled auto-merge
October 11, 2026 13:13
Keeps all CHANGELOG bullets; the guide paragraph merged cleanly (plane order and axis rule). Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012btUjvTQTf6i51Rpr3t8Hc
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.
What and why
Item 4 of SP5 (finding 9, handedness), per the design note (merged in #156, section 5) and the requester's decision to fix it. Independent of #157-#159.
native3d.horizontal_axesreturned the two non-vertical axes in file order. Forvertical_axis = "y"that is(x, z), the mirror image of the right-handed(z, x). Magnitudes (distances, speeds,|dtheta|) were unaffected, but any signed quantity was reflected: IL-11'smean_heading_rad(theta became pi/2 - theta) and the sign ofleft_right_turn_bias.horizontal_axesnow returns the two axes in cyclic order after the vertical one:z-> (x, y),x-> (y, z),y-> (z, x). In that order first x second = up, so the plane is right-handed seen from above.vertical_axisofxorywas mirrored. Onlyywas: forxthe file order(y, z)was already cyclic (those test cases passed before the fix). Behaviour changes only for files read withvertical_axis = y;z(the default) andxare unchanged.flipstill reverses the vertical axis alone, which also mirrors the view from above. Not changed here (documented limit; the Known Issues wording is SP6).Test plan
In
tests/test_readers/test_native3d.py(written first; theycases failed, thexandzones passed):horizontal_axesvalues; a right-handedness property test (first cross second = up) for each axis; and an invariance test that rotates one physical track by the proper (cyclic) rotation for each vertical axis and requires the reader to return the identical horizontal track. The reader tests for Anipose and DeepLabCut 3-D that pinned the old(x, z)order forynow expect(z, x).ruff checkpasses.Checklist
ruff checkpassesCHANGELOG.mdentry under[Unreleased](says which values change and for which files)🤖 Generated with Claude Code
https://claude.ai/code/session_012btUjvTQTf6i51Rpr3t8Hc
Generated by Claude Code