Calculate the weights based on the control points and the MAD between the original data and the new baseline.
MAD (Median Absolute Deviation) is more robust to outliers and
the factor (1.4826) makes MAD scaled to be equivalent to the standard deviation for
normal distributions. https://en.m.wikipedia.org/wiki/Median_absolute_deviation.
Calculate the weights based on the control points and the MAD between the original data and the new baseline. MAD (Median Absolute Deviation) is more robust to outliers and the factor (1.4826) makes MAD scaled to be equivalent to the standard deviation for normal distributions. https://en.m.wikipedia.org/wiki/Median_absolute_deviation.