pymovements.Gaze.smooth#
- Gaze.smooth(method: str = 'savitzky_golay', window_length: int = 7, degree: int = 2, column: str = 'position', padding: str | float | int | None = 'nearest', **kwargs: int | float | str) None[source]#
Smooth column values in
samples.- Parameters:
method (str) – The method to use for smoothing. Choose from
savitzky_golay,moving_average,exponential_moving_average. Seesmooth()for details. (default: ‘savitzky_golay’)window_length (int) – For
moving_averagethis is the window size to calculate the mean of the subsequent samples. Forsavitzky_golaythis is the window size to use for the polynomial fit. Forexponential_moving_averagethis is the span parameter. (default: 7)degree (int) – The degree of the polynomial to use. This has only an effect if using
savitzky_golayas smoothing method. degree must be less than window_length. (default: 2)column (str) – The input column name to which the smoothing is applied. (default: ‘position’)
padding (str | float | int | None) – Must be either
None, a scalar or one of the stringsmirror,nearestorwrap. This determines the type of extension to use for the padded signal to which the filter is applied. When passingNone, no extension padding is used. When passing a scalar value, sample series will be padded using the passed value. Seesmooth()for details on the padding methods. (default: ‘nearest’)**kwargs (int | float | str) – Additional keyword arguments to be passed to the
smooth()method.