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

Computing a (smooth) angular head velocity over time #367

Open
sfmig opened this issue Dec 13, 2024 · 2 comments
Open

Computing a (smooth) angular head velocity over time #367

sfmig opened this issue Dec 13, 2024 · 2 comments
Labels
enhancement New optional feature

Comments

@sfmig
Copy link
Contributor

sfmig commented Dec 13, 2024

Is your feature request related to a problem? Please describe.
Right now to compute this one would: compute the polar angle of (user-defined) head vector, and then take the derivative.

But the output is probably noisy, we would need to think a bit more how this would be improved

@adamltyson
Copy link
Member

I forgot, I also used to use: https://github.com/circstat/pycircstat

@niksirbi
Copy link
Member

With #376 (this is my revival of #315, but still in draft), this can become a two step process:

from movement.kinematics import compute_heading_angle, compute_angle_time_derivative

head_angle = compute_heading_angle(ds.position, left_keypoint="left_ear", right_keypoint="right_ear")
angular_head_velocity = compute_angle_time_derivative(head_angle)

#376 just adds the first of these two functions. The envisioned 2nd function (not necessarily named as in the above example) should be added as a solution to this issue. That function should also provide some options for smoothing the derivative (see comments above).

@niksirbi niksirbi moved this from 🤔 Triage to 📝 Todo in movement progress tracker Jan 24, 2025
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: 📝 Todo
Development

No branches or pull requests

3 participants