add_shot_noise#
- diffsims.pattern.detector_functions.add_shot_noise(pattern, seed=None)[source]#
Applies shot noise to a pattern
- Parameters:
- pattern
numpy.ndarray The diffraction pattern at the detector
- seed
intorNone seed value for the random number generator
- pattern
- Returns:
- shotted_pattern
numpy.ndarray A single sample of the pattern after accounting for shot noise
- shotted_pattern
Notes
This function will (as it should) behave differently depending on the pattern intensity, so be mindful to put your intensities in physical units