incline.local_sigma¶
- incline.local_sigma(y, window_length=25)[source]¶
Estimate a noise level that varies across the series.
Applies the same second-difference logic as
rice_sigma()inside a rolling window, so the estimate stays free of the smoother and free of the trend while being allowed to change.- Parameters:
y (NDArray[float64]) – Observed values.
window_length (int) – Number of second differences averaged at each point. Wider is steadier but slower to follow a change in scale.
- Returns:
Estimated noise standard deviation at each point.
- Raises:
ValueError – If
yis not one-dimensional orwindow_lengthis not an odd integer of at least three.- Return type:
NDArray[float64]