Robust fit using iterative re-weighting
reduced weighting of outliers
Compute noise standard deviation from residual errors
estimated noise std
i = (fit – meas) residuals
Drop (p – 1) lowest residual values, p = 3 = number of fit parameters
ri = residuals for highest n-p+1 values of i
Compute median absolute deviation estimate
= median(abs(ri))/0.6745 (for Normal distribution)