h5analysis.simplemath.apply_savgol
- h5analysis.simplemath.apply_savgol(x, y, window, polyorder, deriv)
Appply smoothing and take derivatives
- Parameters:
x (array) – x data
y (array) – y data
window (int) – Length of the moving window for the Savitzgy-Golay filter
polyorder (int) – Order of the fitted polynomial
deriv (int) – Order of the derivative Choose “0” if only smoothing requested
- Returns:
new_x (numpy array)
smooth_y (numpy array)