add_detector_offset#
- diffsims.pattern.detector_functions.add_detector_offset(pattern, offset)[source]#
Adds/subtracts a fixed offset value from a pattern
- Parameters:
pattern (numpy.ndarray) – The diffraction pattern at the detector
offset (float or numpy.ndarray) – Added through the pattern, broadcasting applies
- Returns:
corrupted_pattern – The pattern, with offset applied, pixels that would have been negative are instead 0.
- Return type:
np.ndarray