pingwyn.core.func.smooth

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.

param obj:

The object to smooth.

type obj:

pingwyn.Curve or pingwyn.Image or pingwyn.Profile

param n_points:

The number of points to smooth the data over.

type n_points:

int

param strat:

The smoothing strategy to apply. By default “uniform”. Note: “convolve” is only supported for pingwyn.Curve.

type strat:

{“uniform”, “gaussian”, “convolve”}, optional

param *args:

Additional arguments should be passed as keyword arguments.

param **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.

rtype:

pingwyn.Curve or pingwyn.Image or pingwyn.Profile

See also

numpy.convolve, scipy.ndimage.uniform_filter, scipy.ndimage.gaussian_filter