Usage of MAD

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

-- ToddHunter - 2013-09-09
Topic revision: r2 - 2014-09-07, ToddHunter
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding NRAO Public Wiki? Send feedback