-
Notifications
You must be signed in to change notification settings - Fork 7
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
Rethink definition of displacement vector #136
Labels
enhancement
New optional feature
Comments
There's no need to plot the negative displacement. # plot displacement vectors: at t, vector from t-1 to t
ax.quiver(
pose_tracks.sel(individuals=mouse_name, space="x"),
pose_tracks.sel(individuals=mouse_name, space="y"),
displacement.sel(individuals=mouse_name, space="x"),
displacement.sel(individuals=mouse_name, space="y"),
angles="xy",
scale=1,
scale_units="xy",
headwidth=7,
headlength=9,
headaxislength=9,
pivot="tip",
) |
yes, I was aware of this option too 😁 My point is that it is a bit more intuitive to think displacement as t to t+1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Right now the displacement vector at t is defined as the vector from t-1 to t. For the first frame, it is defined as the zero vector.
Although this naturally derives from the diff operator, it does feel a bit awkward for example when you want to visually check the displacement vector. Right now, you would typically use a quiver plot, in which at each position t of the trajectory you plot the negative of the displacement vector at t. In this way, the resulting vector at t points to the previous position at t-1, and you can visually check the data behaves as you expect.
Plotting the _negative_displacement vector seems slightly cumbersome and adds to the mental load of things to remember about the data. It may show that a more useful definition of the displacement vector would be "the vector at t that goes from the position at t to the position at t+1". This would make for an easy visual check with quiver plot, and seems like an easier mental model to have of the data. For the last frame, we would define it as the zero vector.
The text was updated successfully, but these errors were encountered: