calamari.transitions.smooth_derivative#
- calamari.transitions.smooth_derivative(x, y, *, order=1, smooth_window=None, polyorder=3)#
Noise-robust Savitzky-Golay derivative of
ywith respect tox.Kept public because downstream analysis reuses it directly. The sweep is resampled onto a uniform grid at its own median spacing (see
_resample()for what that manufactures across sparse regions);smooth_windowis in x-units, not points.Returns
(x_uniform, y_smooth, d)wheredis theorder-th derivative (order=0returns the smoothed signal twice).- Raises:
CurveInputError – Mismatched shapes, insufficient finite points, a non-monotonic or systematically repeated swept axis, or a non-positive smoothing window. Also a
ValueError. NumPy/SciPy exceptions retain their types.- Return type: