pub fn estimate_noise_mad(coeffs: &[f64]) -> f64
Estimate noise standard deviation using Median Absolute Deviation