percentile_clipping¶
- rubin_sim.maf.utils.percentile_clipping(data, percentile=95.0)¶
Calculate the minimum and maximum values of a distribution of points, after discarding data more than ‘percentile’ from the median. This is useful for determining useful data ranges for plots. Note that ‘percentile’ percent of the data is retained.
- Parameters:
- datanumpy.ndarray
The data to clip.
- percentilefloat
Retain values within percentile of the median.
- Returns:
- float, float
The minimum and maximum values of the clipped data.