compute_backward_displacement#
- movement.kinematics.compute_backward_displacement(data)[source]#
Compute backward displacement array in Cartesian coordinates.
The backward displacement array is defined as the difference between the position array at time point
t-1and the position array at time pointt.As a result, for a given individual and keypoint, the backward displacement vector at time point
t, is the vector pointing from the currenttposition to the previoust-1in Cartesian coordinates.- Parameters:
data (xarray.DataArray) – The input data containing position information, with
timeandspace(in Cartesian coordinates) as required dimensions.- Returns:
An xarray DataArray containing backward displacement vectors in Cartesian coordinates.
- Return type:
Notes
For the
positionarray of aposesdataset, thebackward_displacementarray will hold the backward displacement vectors for every keypoint and every individual.For the
positionarray of abboxesdataset, thebackward_displacementarray will hold the backward displacement vectors for the centroid of every individual bounding box.For the
shapearray of abboxesdataset, thebackward_displacementarray will hold vectors with the change in width and height per bounding box, between consecutive time points.