pymovements.dataset.Dataset.pos2acc#

Dataset.pos2acc(*, degree: int = 2, window_length: int = 7, padding: str | float | int | None = 'nearest', verbose: bool = True) Dataset#

Compute gaze accelerations in dva/s^2 from dva coordinates.

This method requires a properly initialized experiment attribute.

After success, the gaze dataframe is extended by the resulting acceleration columns.

Parameters:
  • 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’)

  • verbose (bool) – If True, show progress of computation. (default: True)

Returns:

Returns self, useful for method cascading.

Return type:

Dataset

Raises:

AttributeError – If gaze is None or there are no gaze dataframes present in the gaze attribute, or if experiment is None.