arpes.analysis.filters.savitzky_golay_filter#

arpes.analysis.filters.savitzky_golay_filter(data, window_length=3, polyorder=2, deriv=0, mode='interp', cval=0.0, dim='')[source]#

Implements a Savitzky Golay filter with given window size.

This function is a thin wrapper of scipy.signal.savgol_filter

Parameters:
  • data (xr.DataArray) – Input data.

  • window_length – Number of points in the window that the filter uses locally (must be odd).

  • polyorder – The polynomial order used in the convolution, and must be less than window_length.

  • deriv – the order of the derivative to compute (default = 0 means only smoothing)

  • mode (str) – Mode for savgol_filter (default: “interp”).

  • cval (float) – Constant value used if mode == ‘constant’.

  • dim (str) – The dimension along which the filter is to be applied

Returns:

Smoothed data.