mode_statistic

grizli.utils.mode_statistic(data, percentiles=range(10, 91, 10))[source]

Get modal value of a distribution of data following Connor et al. 2017 https://arxiv.org/pdf/1709.01925.pdf

Here we fit a spline to the cumulative distribution evaluated at knots set to the percentiles of the distribution to improve smoothness.

Parameters
dataarray_like

The input data array.

percentilesarray_like, optional

The percentiles at which to evaluate the cumulative distribution function. Default is [10, 50, 90].

Returns
modefloat

The modal value of the distribution.

References

Connor, T., et al. 2017, ApJ, 848, 37