poisson_noise

sherpa.utils.poisson_noise(x)[source] [edit on github]

Draw samples from a Poisson distribution.

Parameters:x (scalar or array) – The expectation value for the distribution.
Returns:out – A random realisation of the input array, drawn from the Poisson distribution, as a SherpaFloat.
Return type:scalar or array

Notes

The distribution is calculated by numpy.poisson.poisson.

Examples

>>> poisson_noise([10, 20, 5])
array([ 13.,  21.,   6.])