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. uniform  (  x ,  width  )[source]

The probability density function of a uniform distribution centered at 0

$$ \rho(x) = \begin{cases}1/w, & |x| \leq w/2\\ 0, & \text{else}\end{cases}. $$
Parameters:
xarray_like

The quantiles $x$.

widtharray_like

The width $w$ of the uniform distribution.

Returns:
rhondarray

The probability density at x.