Return to directory of Todd's CASA extensions
Compute the median absolute deviation of a list or array with the following formula: numpy.median(numpy.abs(a - numpy.median(a))) / c. See also MADoutliers. If you simply want the standard deviation, you can use numpy.std.
Usage:
au.MAD(a, c=0.6745, axis=0)
Inputs:
a: list or array of values
c: normalization factor. c = 0.6745 is the constant to convert from MAD to standard deviation (it is used by default)
axis: the axis of the array to use
Example:
CASA <7>: au.MAD([1,4,3,5,6,2,3,100])
Out[7]: 2.2238695329873983