-
Notifications
You must be signed in to change notification settings - Fork 26
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
Kinetic Energy Decomposition #228
Comments
Two additional considerations brought up by Dimos:
|
I like this idea! And the suggestion of computing these at the individual level or at the collective level (for a flock) could be cool. But maybe there are metrics that are more informative for a collective. From my experience with flocking behaviour, common metrics relate to how aligned are the velocity vectors of the individuals, e.g. with the average velocity of the flock or with their neighbours' velocity vectors (see Fig1 here for a metric along these lines). Note that with kinetic energy you loose the alignment info. Maybe we could open a new issue on implementing metrics for flocks - what do you think? I think the kinetic energy computation per individual is not currently a very demanded feature, but as you say should be easy to implement, and seems useful for analysis. Maybe a good one to get users to try out and report back? |
Yeah I think metrics for flocking behaviour are interesting in their own right, but that should be a separate issue. For this one, let's focus on computing the kinetic energy per individual only. I agree it's not a high priority, but should be very quick as it's a very well-defined task (famous last words). It would be nice to have an additional metric in the kinematics module. |
This feature was suggested by @dimokaramanlis, who finds it useful in analysing his pose tracking data.
Definition
If we consider each individual's set of keypoints (pose) as a classical system of bodies in physics (with unit masses for simplicity), we could compute the total kinetic energy of that system as:
Where$\mathbf{v}_i(t) = [v_i^x(t), v_i^y(t)]$ is the 2D (x,y) velocity vector of the $i_{th}$ keypoint at time $t$ .
We can decompose$K_{total}$ into two components:
Applications
keypoint-moseq
, where each syllable could have characteristic energy signatures (e.g. some are purely rotational).Implementation
This should be doable in a few lines of
xarray
code, with our existing dataset structure. The output could be aDataArray
with dimensionstime
,individuals
, andenergy
, whereenergy
can have two coordinates -translational
androtational
.It will be facilitated by implementing a
norm()
function inutils/vector.py
, which @sfmig was planning to do anyway.Considerations
The text was updated successfully, but these errors were encountered: