Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix kinematic module to deal with 3D data #363

Open
vigji opened this issue Dec 10, 2024 · 0 comments
Open

Fix kinematic module to deal with 3D data #363

vigji opened this issue Dec 10, 2024 · 0 comments
Labels
enhancement New optional feature

Comments

@vigji
Copy link
Collaborator

vigji commented Dec 10, 2024

Is your feature request related to a problem? Please describe.
After finishing #358, we will need to make sure that all kinematics functions either deal with 3D data or raise suitable warnings when run over datasets with 3 spatial axes.

I will report here hopefully with @niksirbi consent his thorough comment from the PR:

I’ve reviewed all our functions, and the only ones that might present issues with 3D data are:

compute_forward_vector() and its alias compute_head_direction_vector()
These functions include a specific check for 2D data. I think this is fine for now, as they are clearly documented as 2D-specific. If a user passes 3D data, they’ll encounter an informative error. For now, we could open an issue to track the idea of "generalising forward vector to 3D." Generalisation might make sense, but we’d need to carefully consider its implications and how to implement it.

cart2pol and pol2cart from utils/vector.py
These functions conceptually only apply to 2D data (x, y ↔ rho, phi) and currently lack an explicit check for spatial dimensions. While we may eventually provide 3D equivalents (e.g., cart2sph and sph2cart), they could remain as separate functions. There's already been extensive discussion about this in Zulip. For now, adding a check to restrict input spatial dimensions to 2 (similar to the one in compute_forward_vector) should suffice.

That said, it would be prudent to verify that all other kinematics, filtering, and vector utility functions behave correctly with 3D pose data. To achieve this, we would need to:

Create a 3D variant of the valid_poses_dataset_uniform_linear_motion fixture and parameterise existing tests to include this fixture.
Write additional 3D-specific tests where necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New optional feature
Projects
Status: 🤔 Triage
Development

No branches or pull requests

1 participant