pymovements.gaze.transforms.pos2acc#

pymovements.gaze.transforms.pos2acc(*, sampling_rate: float, n_components: int, degree: int = 2, window_length: int = 7, padding: str | float | int | None = 'nearest', position_column: str = 'position', acceleration_column: str = 'acceleration') pl.Expr#

Compute acceleration data from positional data.

Parameters:
  • sampling_rate (float) – Sampling rate of input time series.

  • n_components (int) – Number of components in input column.

  • degree (int) – The degree of the polynomial to use. (default: 2)

  • window_length (int) – The window size to use. (default: 7)

  • padding (str | float | int | None) – The padding method to use. See savitzky_golay for details. (default: ‘nearest’)

  • position_column (str) – The input position column name. (default: ‘position’)

  • acceleration_column (str) – The output acceleration column name. (default: ‘acceleration’)

Returns:

The respective polars expression.

Return type:

pl.Expr