compute_velocity#
- movement.analysis.kinematics.compute_velocity(data)[source]#
Compute velocity array in cartesian coordinates.
The velocity array is the first time-derivative of the position array. It is computed by applying the second-order accurate central differences method on the position array.
- Parameters:
data (xarray.DataArray) – The input data array containing position vectors in cartesian coordinates, with
time
as a dimension.- Returns:
An xarray DataArray containing velocity vectors in cartesian coordinates.
- Return type:
Notes
For the
position
array of aposes
dataset, thevelocity
array will hold the velocity vectors for every keypoint and every individual.For the
position
array of abboxes
dataset, thevelocity
array will hold the velocity vectors for the centroid of every individual bounding box.See also
xarray.DataArray.differentiate()
The underlying method used.