add_gaussian_noise#

diffsims.pattern.detector_functions.add_gaussian_noise(pattern, sigma, seed=None)[source]#

Applies gaussian noise at each pixel within the pattern

Parameters:
  • pattern (numpy.ndarray) – The diffraction pattern at the detector

  • sigma (float) – The (absolute) deviation of the gaussian errors

  • seed (int or None) – seed value for the random number generator

Return type:

corrupted_pattern