darsia.SavitzkyGolaySmoother#

class SavitzkyGolaySmoother(window_length=11, polyorder=3)[source]#

Bases: ContourSmoother

Savitzky–Golay contour smoothing (requires SciPy).

window_length: odd integer (an even value is increased by one), at least 3 polyorder: must be < window_length, automatically clamped

Contours with fewer points than the window are returned unchanged: a window covering the whole contour fits a single polynomial to it, which deforms the (closed) contour instead of smoothing it.

Methods