MADoutliers

Return to directory of Todd's CASA extensions

Find the outlier values, and their indices, in a list by computing its median and median absolute deviation (scaled to the expected rms).

Usage:

au.MADoutliers(mylist, c=0.6745, sigma=3)
Inputs:
  • mylist: a list or array of values
  • c: the value to normalize the Median Absolute Deviation. Dividing by c=0.6745 (the default) converts MAD to RMS for a normal Gaussian distribution.
  • sigma: the multiplier to apply to the MAD to use as the threshold
Returns: 2 lists
  • list of outlier values
  • list of their indices

Example:

CASA <8>: au.MADoutliers([1,1,1,3,1,2,1,1])
  Out[8]: (array([3, 2]), array([3, 5]))

-- ToddHunter - 2014-09-07

This topic: ALMA > TWikiUsers > ToddHunter > CasaExtensions > MADoutliers
Topic revision: 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