compute_time_derivative#
- movement.kinematics.compute_time_derivative(data, order)[source]#
Compute the time-derivative of an array using numerical differentiation.
This function uses
xarray.DataArray.differentiate()
, which differentiates the array with the second-order accurate central differences method.- Parameters:
data (xarray.DataArray) – The input data containing
time
as a required dimension.order (int) – The order of the time-derivative. For an input containing position data, use 1 to compute velocity, and 2 to compute acceleration. Value must be a positive integer.
- Returns:
An xarray DataArray containing the time-derivative of the input data.
- Return type:
See also
xarray.DataArray.differentiate()
The underlying method used.