-
Notifications
You must be signed in to change notification settings - Fork 16
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
Comments
I forgot, I also used to use: https://github.com/circstat/pycircstat |
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). |
See also @kiradust's excellent notes on circular statistics here. As far as I can tell, scipy's directional stats submodule implements the "intrinsic" circular mean and variance (see Kira's notes for the difference between "extrinsic" and "intrinsic" circular means). |
Correction, after looking into scipy's source code, both me and Kira agree that they are actually computing the "extrinsic" mean. |
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
The text was updated successfully, but these errors were encountered: