pingwyn.smooth
- pingwyn.smooth(obj, n_points, strat='uniform', *args, **kwargs)
Smooth data points.
Images will be smoothed in spatial dimensions, curves and profiles have their channel data points (y-axis) smoothed over the x-axis.
- Parameters:
obj (pingwyn.Curve or pingwyn.Image or pingwyn.Profile) – The object to smooth.
n_points (int) – The number of points to smooth the data over.
strat ({"uniform", "gaussian", "convolve"}, optional) – The smoothing strategy to apply. By default “uniform”. Note: “convolve” is only supported for pingwyn.Curve.
*args – Additional arguments should be passed as keyword arguments.
**kwargs –
- policy{“same”, “full”, “valid”}, optional
This keyword argument is only used when strat=”convolve”. Please refer to the documentation for numpy.convolve for the meaning of these modes.
- mode{“reflect”, “constant”, “nearest”, “mirror”, “wrap”}, optional
This keyword argument is only used when strat=”uniform” or strat=”gaussian”. Please refer to the documentation of scipy.ndimage.uniform_filter for the meaning of these modes.
- Returns:
The smoothed object.
- Return type:
See also
numpy.convolve,scipy.ndimage.uniform_filter,scipy.ndimage.gaussian_filter