med_abs_deviation

jwst.clean_flicker_noise.nsclean.med_abs_deviation(d, median=True)[source]

Compute the median absolute deviation.

Computes the median and the median absolute deviation (MAD). For normally distributed data, multiply the MAD by 1.4826 to approximate standard deviation. If median=True (the default), this returns a tuple containing (median, MAD). Otherwise, only the MAD is returned.

Parameters:
dndarray

The input data

medianbool

Return both the median and MAD

Returns:
mfloat, optional

Median

madfloat

Median absolute deviation