qspec logo qspec logo

A physics toolbox for laser spectroscopy.

Static Badge Static Badge Static Badge

Static Badge Static Badge

© 2026 Patrick Müller. All rights reserved.

qspec. median  (  a ,  axis=None  )[source]

The median and the 1-sigma percentiles of a sample, ignoring nan values.

Parameters:
aarray_like

The sample data.

axisint_like | None

The axis along which the three percentiles are computed.

Returns:
(med, per_0, per_1)tuple[ndarray, ndarray, ndarray]

The median (0.5-percentile) as well as the left- (~0.1587) and right-sided (~0.8413) 1-sigma percentile of a given sample a along the specified axis.