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.models. sigma_poisson  (  x ,  y ,  y_model ,  *params  )[source]

Poisson uncertainties estimated from the model values

$$ \sigma_y = \begin{cases}\sqrt{y_\mathrm{model}}, & y_\mathrm{model} > 1\\ 1, & \text{else}\end{cases}. $$

Can be passed as sigma_y to qspec.models.fit.

Parameters:
xarray_like

The x data (unused).

yarray_like

The y data (unused).

y_modelarray_like

The model values at the x data.

paramsAny

The model parameters (unused).

Returns:
sigma_yndarray[floating]

The Poisson uncertainties.