add_linear_detector_gain#

diffsims.pattern.detector_functions.add_linear_detector_gain(pattern, gain)[source]#

Multiplies the pattern by a gain (which is not a function of the pattern)

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

  • gain (float or numpy.ndarray) – Multiplied through the pattern, broadcasting applies

Returns:

corrupted_pattern – The pattern, with gain applied

Return type:

numpy.ndarray