CONAN.utils.outlier_clipping

CONAN.utils.outlier_clipping#

CONAN.utils.outlier_clipping(x, y, yerr=None, clip=5, width=15, verbose=True, return_clipped_indices=False)#

Remove outliers using a running median method. Points > clip*M.A.D are removed where M.A.D is the mean absolute deviation from the median in each window

Parameters:
  • x (array_like;) – dependent variable.

  • y (array_like; same shape as x) – Depedent variable. data on which to perform clipping

  • yerr (array_like(x);) – errors on the dependent variable

  • clip (float;) – cut off value above the median. Default is 5

  • width (int;) – Number of points in window to use when computing the running median. Must be odd. Default is 15

Returns:

x_new, y_new, yerr_new

Return type:

Each and array with the remaining points after clipping