add_shot_and_point_spread#

diffsims.pattern.detector_functions.add_shot_and_point_spread(pattern, sigma, shot_noise=True, seed=None)[source]#

Adds shot noise (optional) and gaussian point spread (via a convolution) to a pattern

Parameters:
patternnumpy.ndarray

The diffraction pattern at the detector

sigmafloat

The standard deviation of the gaussian blur, in pixels

shot_noisebool

Whether to include shot noise in the original signal, default True

seedint or None

seed value for the random number generator (effects the shot noise only)

Returns:
detector_patternnumpy.ndarray

A single sample of the pattern after accounting for detector properties

See also

add_shot_noise

adds only shot noise

add_gaussian_point_spread

adds only point spread